Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/templates_py/gamelogic_simple.py')
-rw-r--r--release/scripts/templates_py/gamelogic_simple.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/release/scripts/templates_py/gamelogic_simple.py b/release/scripts/templates_py/gamelogic_simple.py
new file mode 100644
index 00000000000..dbfcf948b18
--- /dev/null
+++ b/release/scripts/templates_py/gamelogic_simple.py
@@ -0,0 +1,17 @@
+import bge
+
+
+def main():
+
+ cont = bge.logic.getCurrentController()
+ own = cont.owner
+
+ sens = cont.sensors['mySensor']
+ actu = cont.actuators['myActuator']
+
+ if sens.positive:
+ cont.activate(actu)
+ else:
+ cont.deactivate(actu)
+
+main()