38 class SKYLICHT_API CContainerObject :
public CGameObject
41 ArrayGameObject m_childs;
42 ArrayGameObject m_add;
43 ArrayGameObject m_remove;
50 bool m_updateRemoveAdd;
51 bool m_updateListChild;
56 CContainerObject(CGameObject* parent,
CZone* zone);
58 virtual ~CContainerObject();
60 CGameObject* createEmptyObject();
62 CContainerObject* createContainerObject();
66 void updateAddRemoveObject(
bool force =
false);
68 inline void notifyUpdateListChild()
70 m_updateListChild =
true;
73 int getNumberObjects();
75 void updateIndexSearchObject();
77 CGameObject* getChildObjectBefore(CGameObject*
object);
79 void bringToNext(CGameObject*
object, CGameObject* target,
bool behind);
81 void bringToChild(CGameObject*
object);
83 void sortChildsByTemplateOrder(std::vector<std::string>& order);
85 virtual void setTemplateChanged(
bool b);
87 virtual CGameObject* searchObject(
const wchar_t* objectName);
89 virtual CGameObject* searchObjectInChild(
const wchar_t* objectName);
91 virtual CGameObject* searchObjectByID(
const char*
id);
93 virtual CGameObject* searchObjectInChildByID(
const char*
id);
95 virtual CGameObject* searchObjectInChildByTemplateObjId(
const char*
id);
97 virtual u32 searchObjectByCullingLayer(ArrayGameObject& result,
u32 mask);
99 virtual void setCullingLayerForChild(
u32 mask);
101 virtual void setCullingOnOffForChild(
u32 value,
bool on);
103 virtual CEntity* searchEntityByID(
const char*
id);
105 virtual CEntity* searchEntityInChildByID(
const char*
id);
107 virtual bool testConflictName(
const wchar_t* objectName);
109 std::string generateObjectName(
const char* objTemplate);
111 void registerObjectInSearchList(CGameObject* obj);
113 void removeObject(CGameObject* pObj);
115 void addChild(CGameObject* p);
117 inline ArrayGameObject* getChilds()
122 void removeAllObject(
bool force =
false);
125 void getListObjectType(ArrayGameObject& listObjs, T type);
128 std::vector<T*> getComponentsInChild(
bool addThis);
132 bool haveChild(CGameObject* gameObject);
134 DECLARE_GETTYPENAME(CContainerObject)