mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
spawning objects
This commit is contained in:
parent
c6e3869176
commit
f717e1c109
10 changed files with 40 additions and 42 deletions
|
|
@ -6,6 +6,8 @@
|
|||
#include "../typedefs.h"
|
||||
#include "../settings.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
|
||||
class Content;
|
||||
class World;
|
||||
|
|
@ -20,11 +22,13 @@ class PhysicsSolver;
|
|||
class ChunksStorage;
|
||||
|
||||
class Level {
|
||||
private:
|
||||
int objCounter;
|
||||
public:
|
||||
std::unique_ptr<World> world;
|
||||
const Content* const content;
|
||||
std::list<Object*> objects;
|
||||
Player* player;
|
||||
std::list<std::shared_ptr<Object>> objects;
|
||||
std::shared_ptr<Player> player;
|
||||
Chunks* chunks;
|
||||
ChunksStorage* chunksStorage;
|
||||
std::unique_ptr<Inventories> inventories;
|
||||
|
|
@ -45,7 +49,7 @@ public:
|
|||
World* getWorld();
|
||||
|
||||
template<class T, typename... Args>
|
||||
T* spawnObjectOfClass(Args&&... args);
|
||||
std::shared_ptr<T> spawnObject(Args&&... args);
|
||||
};
|
||||
|
||||
#endif /* WORLD_LEVEL_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue