forked from bartvdbraak/blender
patch from Ronan Bignaux
use python3 print()
This commit is contained in:
parent
0ed0773eff
commit
da2db4bc58
@ -24,23 +24,23 @@ def main():
|
||||
|
||||
# Some example functions, remove to write your own script.
|
||||
# check for a positive sensor, will run on any object without errors.
|
||||
print 'Logic info for KX_GameObject', own.name
|
||||
print('Logic info for KX_GameObject', own.name)
|
||||
input = False
|
||||
|
||||
for sens in cont.sensors:
|
||||
# The sensor can be on another object, we may want to use it
|
||||
own_sens = sens.owner
|
||||
print ' sensor:', sens.name,
|
||||
print(' sensor:', sens.name, end=' ')
|
||||
if sens.positive:
|
||||
print '(true)'
|
||||
print('(true)')
|
||||
input = True
|
||||
else:
|
||||
print '(false)'
|
||||
print('(false)')
|
||||
|
||||
for actu in cont.actuators:
|
||||
# The actuator can be on another object, we may want to use it
|
||||
own_actu = actu.owner
|
||||
print ' actuator:', actu.name
|
||||
print(' actuator:', actu.name)
|
||||
|
||||
# This runs the actuator or turns it off
|
||||
# note that actuators will continue to run unless explicitly turned off.
|
||||
@ -58,9 +58,9 @@ def main():
|
||||
|
||||
# Loop through all other objects in the scene
|
||||
sce = GameLogic.getCurrentScene()
|
||||
print 'Scene Objects:', sce.name
|
||||
print('Scene Objects:', sce.name)
|
||||
for ob in sce.objects:
|
||||
print ' ', ob.name, ob.worldPosition
|
||||
print(' ', ob.name, ob.worldPosition)
|
||||
|
||||
|
||||
# Example where collision objects are checked for their properties
|
||||
@ -72,7 +72,7 @@ def main():
|
||||
if ob.has_key('life'):
|
||||
own['life'] += ob['life']
|
||||
ob['life'] = 0
|
||||
print own['life']
|
||||
print(own['life'])
|
||||
"""
|
||||
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user