2022-06-16 21:33:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ISceneObj.h"
|
|
|
|
|
|
|
|
namespace al {
|
|
|
|
|
2022-07-05 19:45:22 +00:00
|
|
|
typedef al::ISceneObj* (*SceneObjCreator)(int);
|
|
|
|
|
2022-06-16 21:33:18 +00:00
|
|
|
class SceneObjHolder {
|
|
|
|
public:
|
2022-07-05 19:45:22 +00:00
|
|
|
SceneObjHolder(SceneObjCreator, int);
|
2022-06-16 21:33:18 +00:00
|
|
|
|
|
|
|
ISceneObj *tryGetObj(int) const; // unsafe get still
|
|
|
|
void setSceneObj(al::ISceneObj *,int);
|
|
|
|
bool isExist(int) const;
|
|
|
|
void initAfterPlacementSceneObj(struct ActorInitInfo const&);
|
|
|
|
ISceneObj *getObj(int) const;
|
|
|
|
void create(int);
|
|
|
|
|
2022-07-05 19:45:22 +00:00
|
|
|
SceneObjCreator mObjCreator;
|
|
|
|
al::ISceneObj **mSceneObjs;
|
|
|
|
int mMaxObjCount;
|
|
|
|
|
2022-06-16 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-07-05 19:45:22 +00:00
|
|
|
static_assert(sizeof(SceneObjHolder) == 0x18, "SceneObjHolder Size");
|
|
|
|
|
2022-06-16 21:33:18 +00:00
|
|
|
class IUseSceneObjHolder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual al::SceneObjHolder* getSceneObjHolder() const = 0;
|
|
|
|
|
|
|
|
static const char* sSceneObjName;
|
|
|
|
};
|
|
|
|
};
|