Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/GameLogic/SCA_StateActuator.h
- This file was moved from source/gameengine/Ketsji/KX_StateActuator.h.
| Show All 19 Lines | |||||
| * | * | ||||
| * The Original Code is: all of this file. | * The Original Code is: all of this file. | ||||
| * | * | ||||
| * Contributor(s): none yet. | * Contributor(s): none yet. | ||||
| * | * | ||||
| * ***** END GPL LICENSE BLOCK ***** | * ***** END GPL LICENSE BLOCK ***** | ||||
| */ | */ | ||||
| /** \file KX_StateActuator.h | /** \file SCA_StateActuator.h | ||||
| * \ingroup ketsji | * \ingroup ketsji | ||||
| * \brief Actuator to toggle visibility/invisibility of objects | * \brief Actuator to toggle visibility/invisibility of objects | ||||
| */ | */ | ||||
| #ifndef __KX_STATEACTUATOR_H__ | #ifndef __SCA_STATEACTUATOR_H__ | ||||
| #define __KX_STATEACTUATOR_H__ | #define __SCA_STATEACTUATOR_H__ | ||||
| #include "SCA_IActuator.h" | #include "SCA_IActuator.h" | ||||
| /* | /* | ||||
| * Use of SG_DList : element of actuator being deactivated | * Use of SG_DList : element of actuator being deactivated | ||||
| * Head: SCA_LogicManager::m_removedActuators | * Head: SCA_LogicManager::m_removedActuators | ||||
| * Use of SG_QList : element of global activated state actuator list | * Use of SG_QList : element of global activated state actuator list | ||||
| * Head: KX_StateActuator::m_stateActuatorHead | * Head: SCA_StateActuator::m_stateActuatorHead | ||||
| */ | */ | ||||
| class KX_StateActuator : public SCA_IActuator | class SCA_StateActuator : public SCA_IActuator | ||||
| { | { | ||||
| Py_Header | Py_Header | ||||
| /** Make visible? */ | |||||
| enum { | |||||
| OP_NOP = -1, | |||||
| OP_CPY = 0, | |||||
| OP_SET, | |||||
| OP_CLR, | |||||
| OP_NEG, | |||||
| OP_COUNT | |||||
| }; | |||||
| // SG_Dlist: element of objects with active actuators, always put in front of the list | // SG_Dlist: element of objects with active actuators, always put in front of the list | ||||
| // Head: SCA_LogicManager::m_activeActuators | // Head: SCA_LogicManager::m_activeActuators | ||||
| // SG_QList: Head of active state actuators list globally | // SG_QList: Head of active state actuators list globally | ||||
| // Elements: KX_StateActuator | // Elements: SCA_StateActuator | ||||
| static SG_QList m_stateActuatorHead; | static SG_QList m_stateActuatorHead; | ||||
| int m_operation; | int m_operation; | ||||
| int m_mask; | int m_mask; | ||||
| public: | public: | ||||
| KX_StateActuator( | enum { | ||||
| OP_NOP = -1, | |||||
| OP_CPY = 0, | |||||
| OP_SET, | |||||
| OP_CLR, | |||||
| OP_NEG, | |||||
| OP_COUNT | |||||
| }; | |||||
| SCA_StateActuator( | |||||
| SCA_IObject* gameobj, | SCA_IObject* gameobj, | ||||
| int operation, | int operation, | ||||
| unsigned int mask | unsigned int mask | ||||
| ); | ); | ||||
| virtual | virtual ~SCA_StateActuator(void); | ||||
| ~KX_StateActuator( | |||||
| void | |||||
| ); | |||||
| virtual CValue* | virtual CValue* GetReplica(void); | ||||
| GetReplica( | |||||
| void | |||||
| ); | |||||
| virtual bool | virtual bool Update(); | ||||
| Update(); | |||||
| virtual void Deactivate(); | virtual void Deactivate(); | ||||
| virtual void Activate(SG_DList& head); | virtual void Activate(SG_DList& head); | ||||
| /* --------------------------------------------------------------------- */ | /* --------------------------------------------------------------------- */ | ||||
| /* Python interface ---------------------------------------------------- */ | /* Python interface ---------------------------------------------------- */ | ||||
| /* --------------------------------------------------------------------- */ | /* --------------------------------------------------------------------- */ | ||||
| }; | }; | ||||
| #endif | #endif | ||||