GameObjectPool fixes

This commit is contained in:
2024-09-14 21:28:18 +05:00
parent 3df4361779
commit 47574e9b30
6 changed files with 80 additions and 27 deletions

View File

@@ -32,10 +32,15 @@ class GameObject {
GameObject* parent;
public:
GameObject(Mono::Object managed_obj, GameObject* parent);
GameObject(const GameObject& o) = delete;
GameObject(GameObject&& o);
GameObject& operator=(GameObject&& o);
inline Transform& getTransform(){ return transform; }
inline Transform& getTransform() { return transform; }
inline const Transform& getTransform() const { return transform; }
inline Mono::ObjectHandle& getObjectHandle() { return object_handle; }
inline const Mono::ObjectHandle& getObjectHandle() const { return object_handle; }
bool tryGetComponent(const std::u16string& name, Component** out_component);
bool tryAddComponent(const std::u16string& name, Component&& component);
};