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:
authorDalai Felinto <dfelinto@gmail.com>2010-04-20 12:23:22 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-04-20 12:23:22 +0400
commitdd2080f5c4809522393155776574e15a696f1a3f (patch)
tree926fff56837550621322749feab8f7efcb8823d1 /source/gameengine/PyDoc/GameKeys.py
parentb52eddd95a5dd68a98520be0de211e08d991e868 (diff)
BGE EPY Docs: PhysicsConstraints and fixes in other modules
PhysicsConstraints module documented by Jean-François (Ninja Goliath) based on GameKit 2nd ed. Thanks for the initiative and the great help! General advice for anyone helping with EpyDocs: * use :: instead of : to keep the indentation correct, * use B{} for clarity when needed (e.g. createConstraints) Adding F13 to F19 to complement Matt's recent commit * There are other (not so important) functions in PhysicsConstraints module that are not exposed in the documentation right now. The generated page is temporarily here, if someone want to review it: http://blenderecia.orgfree.com/blender/tmp/PhysicsConstraints-module.html
Diffstat (limited to 'source/gameengine/PyDoc/GameKeys.py')
-rw-r--r--source/gameengine/PyDoc/GameKeys.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/source/gameengine/PyDoc/GameKeys.py b/source/gameengine/PyDoc/GameKeys.py
index 8e5c7d3ae24..1c4f45ddbab 100644
--- a/source/gameengine/PyDoc/GameKeys.py
+++ b/source/gameengine/PyDoc/GameKeys.py
@@ -13,7 +13,7 @@ Example::
co = GameLogic.getCurrentController()
# 'Keyboard' is a keyboard sensor
- sensor = co.getSensor('Keyboard')
+ sensor = co.sensors["Keyboard"]
sensor.key = GameKeys.F1KEY
Example::
@@ -23,18 +23,18 @@ Example::
co = GameLogic.getCurrentController()
# 'Keyboard' is a keyboard sensor
- sensor = co.getSensor('Keyboard')
- keylist = sensor.events
- for key in keylist:
+ sensor = co.sensors["Keyboard"]
+
+ for key,status in sensor.events:
# key[0] == GameKeys.keycode, key[1] = status
- if key[1] == GameLogic.KX_INPUT_JUST_ACTIVATED:
- if key[0] == GameKeys.WKEY:
+ if status == GameLogic.KX_INPUT_JUST_ACTIVATED:
+ if key == GameKeys.WKEY:
# Activate Forward!
- if key[0] == GameKeys.SKEY:
+ if key == GameKeys.SKEY:
# Activate Backward!
- if key[0] == GameKeys.AKEY:
+ if key == GameKeys.AKEY:
# Activate Left!
- if key[0] == GameKeys.DKEY:
+ if key == GameKeys.DKEY:
# Activate Right!
@group Alphabet keys: AKEY, BKEY, CKEY, DKEY, EKEY, FKEY, GKEY, HKEY, IKEY, JKEY, KKEY, LKEY, MKEY, NKEY, OKEY, PKEY, QKEY, RKEY, SKEY, TKEY, UKEY, VKEY, WKEY, XKEY, YKEY, ZKEY
@@ -110,7 +110,7 @@ Example::
@var PADENTER:
@var PADPLUSKEY:
-@group Function Keys: F1KEY, F2KEY, F3KEY, F4KEY, F5KEY, F6KEY, F7KEY, F8KEY, F9KEY, F10KEY, F11KEY, F12KEY
+@group Function Keys: F1KEY, F2KEY, F3KEY, F4KEY, F5KEY, F6KEY, F7KEY, F8KEY, F9KEY, F10KEY, F11KEY, F12KEY, F13KEY, F14KEY, F15KEY, F16KEY, F17KEY, F18KEY, F19KEY
@var F1KEY:
@var F2KEY:
@var F3KEY:
@@ -123,6 +123,13 @@ Example::
@var F10KEY:
@var F11KEY:
@var F12KEY:
+@var F13KEY:
+@var F14KEY:
+@var F15KEY:
+@var F16KEY:
+@var F17KEY:
+@var F18KEY:
+@var F19KEY:
@group Other Keys: ACCENTGRAVEKEY, BACKSLASHKEY, BACKSPACEKEY, COMMAKEY, DELKEY, ENDKEY, EQUALKEY, ESCKEY, HOMEKEY, INSERTKEY, LEFTBRACKETKEY, LINEFEEDKEY, MINUSKEY, PAGEDOWNKEY, PAGEUPKEY, PAUSEKEY, PERIODKEY, QUOTEKEY, RIGHTBRACKETKEY, RETKEY, SEMICOLONKEY, SLASHKEY, SPACEKEY, TABKEY
@var ACCENTGRAVEKEY: