123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
-
-
- #ifndef _WORLD_H_
- #define _WORLD_H_
-
- #include <memory>
- #include <vector>
-
- #include "Entity.h"
- #include "Room.h"
- #include "SkeletalModel.h"
- #include "Sprite.h"
- #include "StaticMesh.h"
-
-
- class World {
- public:
-
-
-
- ~World();
-
-
-
- void destroy();
-
- void addRoom(Room &room);
- unsigned long sizeRoom();
- Room &getRoom(unsigned long index);
-
- void addSprite(SpriteSequence &sprite);
- unsigned long sizeSprite();
- SpriteSequence &getSprite(unsigned long index);
-
- void addEntity(Entity &entity);
- unsigned long sizeEntity();
- Entity &getEntity(unsigned long index);
-
- void addSkeletalModel(SkeletalModel &model);
- unsigned long sizeSkeletalModel();
- SkeletalModel &getSkeletalModel(unsigned long index);
-
- void addStaticMesh(StaticMesh &model);
- unsigned long sizeStaticMesh();
- StaticMesh &getStaticMesh(unsigned long index);
-
-
-
- long getRoomByLocation(long index, float x, float y, float z);
-
-
-
- long getRoomByLocation(float x, float y, float z);
-
- private:
- std::vector<std::unique_ptr<Room>> mRooms;
- std::vector<std::unique_ptr<SpriteSequence>> mSprites;
- std::vector<std::unique_ptr<Entity>> mEntities;
- std::vector<std::unique_ptr<SkeletalModel>> mModels;
- std::vector<std::unique_ptr<StaticMesh>> mMeshes;
- };
-
- World &getWorld();
-
- #endif
|