diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-06 02:32:10 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-07-06 02:32:10 +0400 |
commit | c1715223b90e1b9df7b954e4c669d6a380b18c37 (patch) | |
tree | bb1aa2efde3f8616f54d689c9d200e46ae5889e6 /doc | |
parent | 9fca591c2b83cf26ee731450a591698ad74c6d29 (diff) |
BGE Animations: Updating the bge.types docs to include the three new methods to KX_GameObject: playAction(), getActionFrame(), setActionFrame().
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/rst/bge.types.rst | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/python_api/rst/bge.types.rst b/doc/python_api/rst/bge.types.rst index e42b362c771..b3841aaea0b 100644 --- a/doc/python_api/rst/bge.types.rst +++ b/doc/python_api/rst/bge.types.rst @@ -1539,6 +1539,49 @@ Game Engine bge.types Module Return the value matching key, or the default value if its not found. :return: The key value or a default. + .. method:: playAction(name, start_frame, end_frame, layer=0, priority=0 blendin=0, play_mode=ACT_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0) + + Plays an action. + + :arg name: the name of the action + :type name: string + :arg start: the start frame of the action + :type start: float + :arg end: the end frame of the action + :type end: float + :arg layer: the layer the action will play in (actions in different layers are added/blended together) + :type layer: integer + :arg priority: only play this action if there isn't an action currently playing in this layer with a higher (lower number) priority + :type priority: integer + :arg blendin: the amount of blending between this animation and the previous one on this layer + :type blendin: float + :arg play_mode: the play mode + :type play_mode: KX_ACTION_PLAY, KX_ACTION_LOOP, or KX_ACTION_PING_PONG + :arg layer_weight: how much of the previous layer to use for blending (0 = add) + :type layer_weight: float + :arg ipo_flags: flags for the old IPO behaviors (force, etc) + :type ipo_flags: int bitfield + :arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc) + :type speed: float + + .. method:: getActionFrame(layer) + + Gets the current frame of the action playing in the supplied layer + + :arg layer: The layer that you want to get the frame from. + :type layer: integer + + :return: The current frame of the action + + .. method:: setActionFrame(layer, frame) + + Set the current frame of the action playing in the supplied layer + + :arg layer: The layer where you want to set the frame + :type layer: integer + :arg frame: The frame to set the action to + :type frame: float + .. class:: KX_IpoActuator(SCA_IActuator) IPO actuator activates an animation. |