diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-10-19 04:45:37 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-10-19 04:45:37 +0400 |
commit | a377a7edf67869722c585086ac6ab1f295cbff87 (patch) | |
tree | 1736de08fe9174761607dce5d54a16af25eba049 /release/scripts/templates/gamelogic.py | |
parent | 08232350d5797302e3638e69ec78657d853976aa (diff) | |
parent | b743454ce1c361e6161da8ae5f840c2befe3a081 (diff) |
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r32300:32571soc-2010-nicolasbishop
Diffstat (limited to 'release/scripts/templates/gamelogic.py')
-rw-r--r-- | release/scripts/templates/gamelogic.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/release/scripts/templates/gamelogic.py b/release/scripts/templates/gamelogic.py index 21a901c091b..0a419955b81 100644 --- a/release/scripts/templates/gamelogic.py +++ b/release/scripts/templates/gamelogic.py @@ -1,10 +1,7 @@ # This script must be assigned to a python controller # where it can access the object that owns it and the sensors/actuators that it connects to. -# GameLogic has been added to the global namespace no need to import - -# for keyboard event comparison -# import GameKeys +import bge # support for Vector(), Matrix() types and advanced functions like Matrix.Scale(...) and Matrix.Rotation(...) # import mathutils @@ -13,7 +10,7 @@ # import Rasterizer def main(): - cont = GameLogic.getCurrentController() + cont = bge.logic.getCurrentController() # The KX_GameObject that owns this controller. own = cont.owner @@ -57,7 +54,7 @@ def main(): # Loop through all other objects in the scene - sce = GameLogic.getCurrentScene() + sce = bge.logic.getCurrentScene() print('Scene Objects:', sce.name) for ob in sce.objects: print(' ', ob.name, ob.worldPosition) |