CSEngine
Loading...
Searching...
No Matches
GameObjectMgr.h
1#pragma once
2
3#include <queue>
4#include "../MacroDef.h"
5#include "GameObjectContainer.h"
6#include "Base/CoreBase.h"
7
8namespace CSE {
9
10 class SGameObject;
11
13 public:
14 explicit GameObjectMgr();
15 ~GameObjectMgr() override;
16
17 public:
18 void Init() override;
19
20 void Update(float elapsedTime) override;
21
22 void DestroyQueuedObject();
23
24 void AddDestroyObject(SGameObject* object);
25
26 SGameObject* Find(const std::string& name) const;
27
28 SGameObject* FindByID(const std::string& id) const;
29
30 SGameObject* FindByHash(const std::string& hash) const;
31
32 SComponent* FindComponentByID(const std::string& id) const;
33
34 SComponent* FindComponentByHash(const std::string& hash) const;
35
36 private:
37 std::queue<SGameObject*> m_destroyObjectsQueue;
38
39 };
40}