diff options
author | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-02 02:29:15 +0400 |
---|---|---|
committer | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-02 02:29:15 +0400 |
commit | 0677398a649b6b8c293df3ce3c6668f0a3be3bc8 (patch) | |
tree | 9d510a5bd23559bf4fae670ed04d7e5d6c12578c /source/gameengine/GameLogic/SCA_IObject.h | |
parent | 59248e9f62006ba05e3098e4d213f3dcb23fe711 (diff) | |
parent | bc942eceacb638735dc4f4f68252c4c207147a70 (diff) |
merge from 23153 to 23595soc-2009-imbusy
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IObject.h')
-rw-r--r-- | source/gameengine/GameLogic/SCA_IObject.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index 3060410dc6b..f078e129378 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -36,15 +36,19 @@ #include "Value.h" #include <vector> +class SCA_IObject; class SCA_ISensor; class SCA_IController; class SCA_IActuator; +#ifndef DISABLE_PYTHON template<class T> T PyVecTo(PyObject*); +#endif typedef std::vector<SCA_ISensor *> SCA_SensorList; typedef std::vector<SCA_IController *> SCA_ControllerList; typedef std::vector<SCA_IActuator *> SCA_ActuatorList; +typedef std::vector<SCA_IObject *> SCA_ObjectList; class SCA_IObject : public CValue { @@ -59,6 +63,7 @@ protected: SCA_ControllerList m_controllers; SCA_ActuatorList m_actuators; SCA_ActuatorList m_registeredActuators; // actuators that use a pointer to this object + SCA_ObjectList m_registeredObjects; // objects that hold reference to this object // SG_Dlist: element of objects with active actuators // Head: SCA_LogicManager::m_activeActuators @@ -143,13 +148,22 @@ public: void RegisterActuator(SCA_IActuator* act); void UnregisterActuator(SCA_IActuator* act); + void RegisterObject(SCA_IObject* objs); + void UnregisterObject(SCA_IObject* objs); + /** + * UnlinkObject(...) + * this object is informed that one of the object to which it holds a reference is deleted + * returns true if there was indeed a reference. + */ + virtual bool UnlinkObject(SCA_IObject* clientobj) { return false; } + SCA_ISensor* FindSensor(const STR_String& sensorname); SCA_IActuator* FindActuator(const STR_String& actuatorname); SCA_IController* FindController(const STR_String& controllername); void SetCurrentTime(float currentTime) {} - void ReParentLogic(); + virtual void ReParentLogic(); /** * Set whether or not to ignore activity culling requests @@ -205,6 +219,7 @@ public: typedef enum ObjectTypes { OBJ_ARMATURE=0, OBJ_CAMERA=1, + OBJ_LIGHT=2, }ObjectTypes; }; |