Game Types (bge.types)¶
Introduction¶
This module contains the classes that appear as instances in the Game Engine. A script must interact with these classes if it is to affect the behaviour of objects in a game.
The following example would move an object (i.e. an instance of
KX_GameObject
) one unit up.
# bge.types.SCA_PythonController
cont = bge.logic.getCurrentController()
# bge.types.KX_GameObject
obj = cont.owner
obj.worldPosition.z += 1
To run the code, it could be placed in a Blender text block and executed with
a SCA_PythonController
logic brick.
Types¶
- BL_ActionActuator(SCA_IActuator)
- BL_ArmatureActuator(SCA_IActuator)
- BL_ArmatureBone(PyObjectPlus)
- BL_ArmatureChannel(PyObjectPlus)
- BL_ArmatureConstraint(PyObjectPlus)
- BL_ArmatureObject(KX_GameObject)
- BL_Shader(PyObjectPlus)
- BL_ShapeActionActuator(SCA_IActuator)
- CListValue(CPropValue)
- CPropValue(CValue)
- CValue(PyObjectPlus)
- KX_ArmatureSensor(SCA_ISensor)
- KX_BlenderMaterial(PyObjectPlus)
- KX_Camera(KX_GameObject)
- KX_CameraActuator(SCA_IActuator)
- KX_CharacterWrapper(PyObjectPlus)
- KX_ConstraintActuator(SCA_IActuator)
- KX_ConstraintWrapper(PyObjectPlus)
- KX_FontObject(KX_GameObject)
- KX_GameActuator(SCA_IActuator)
- KX_GameObject(SCA_IObject)
- KX_IpoActuator(SCA_IActuator)
- KX_LibLoadStatus(PyObjectPlus)
- KX_LightObject(KX_GameObject)
- KX_MeshProxy(SCA_IObject)
- KX_MouseActuator(SCA_IActuator)
- KX_MouseFocusSensor(SCA_MouseSensor)
- KX_NavMeshObject(KX_GameObject)
- KX_NearSensor(KX_TouchSensor)
- KX_NetworkMessageActuator(SCA_IActuator)
- KX_NetworkMessageSensor(SCA_ISensor)
- KX_ObjectActuator(SCA_IActuator)
- KX_ParentActuator(SCA_IActuator)
- KX_PolyProxy(SCA_IObject)
- KX_PolygonMaterial(PyObjectPlus)
- KX_RadarSensor(KX_NearSensor)
- KX_RaySensor(SCA_ISensor)
- KX_SCA_AddObjectActuator(SCA_IActuator)
- KX_SCA_DynamicActuator(SCA_IActuator)
- KX_SCA_EndObjectActuator(SCA_IActuator)
- KX_SCA_ReplaceMeshActuator(SCA_IActuator)
- KX_Scene(PyObjectPlus)
- KX_SceneActuator(SCA_IActuator)
- KX_SoundActuator(SCA_IActuator)
- KX_StateActuator(SCA_IActuator)
- KX_SteeringActuator(SCA_IActuator)
- KX_TouchSensor(SCA_ISensor)
- KX_TrackToActuator(SCA_IActuator)
- KX_VehicleWrapper(PyObjectPlus)
- KX_VertexProxy(SCA_IObject)
- KX_VisibilityActuator(SCA_IActuator)
- PyObjectPlus
- SCA_2DFilterActuator(SCA_IActuator)
- SCA_ANDController(SCA_IController)
- SCA_ActuatorSensor(SCA_ISensor)
- SCA_AlwaysSensor(SCA_ISensor)
- SCA_DelaySensor(SCA_ISensor)
- SCA_IActuator(SCA_ILogicBrick)
- SCA_IController(SCA_ILogicBrick)
- SCA_ILogicBrick(CValue)
- SCA_IObject(CValue)
- SCA_ISensor(SCA_ILogicBrick)
- SCA_JoystickSensor(SCA_ISensor)
- SCA_KeyboardSensor(SCA_ISensor)
- SCA_MouseSensor(SCA_ISensor)
- SCA_NANDController(SCA_IController)
- SCA_NORController(SCA_IController)
- SCA_ORController(SCA_IController)
- SCA_PropertyActuator(SCA_IActuator)
- SCA_PropertySensor(SCA_ISensor)
- SCA_PythonController(SCA_IController)
- SCA_PythonJoystick(PyObjectPlus)
- SCA_PythonKeyboard(PyObjectPlus)
- SCA_PythonMouse(PyObjectPlus)
- SCA_RandomActuator(SCA_IActuator)
- SCA_RandomSensor(SCA_ISensor)
- SCA_XNORController(SCA_IController)
- SCA_XORController(SCA_IController)