BGE Animations: Updating the bge.types docs to include the three new methods to KX_GameObject: playAction(), getActionFrame(), setActionFrame().
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user