blender/source/gameengine/PyDoc/SCA_ILogicBrick.py
Benoit Bolsee 1c663bbc7e First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. 
To make porting of game code easier, the properties have usually the same type and use than
the return values/parameters of the get/set methods. 
More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up

Old methods are still available but will produce deprecation warnings on the console: 

"<method> is deprecated, use the <property> property instead"

You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu.

PyDoc is updated to include the new properties and display a deprecation warning
for the get/set methods that are being deprecated.
2008-12-29 16:36:58 +00:00

42 lines
1.1 KiB
Python

# $Id$
# Documentation for the logic brick base class SCA_ILogicBrick
from KX_GameObject import *
class SCA_ILogicBrick:
"""
Base class for all logic bricks.
@ivar executePriority: This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
@type executePriority: int
"""
def getOwner():
"""
Gets the game object associated with this logic brick.
@rtype: L{KX_GameObject}
"""
#--The following methods are deprecated--
def setExecutePriority(priority):
"""
Sets the priority of this logic brick.
This determines the order controllers are evaluated, and actuators are activated.
Bricks with lower priority will be executed first.
Deprecated: Use the "executePriority" property instead.
@type priority: integer
@param priority: the priority of this logic brick.
"""
def getExecutePriority():
"""
Gets the execution priority of this logic brick.
Deprecated: Use the "executePriority" property instead.
@rtype: integer
@return: this logic bricks current priority.
"""