// Copyright (C) 2015 Jérôme Leclercq // This file is part of the "Nazara Development Kit" // For conditions of distribution and use, see copyright notice in Prerequesites.hpp #pragma once #ifndef NDK_WORLD_HPP #define NDK_WORLD_HPP #include #include #include #include namespace Ndk { class NDK_API World : NzNonCopyable { public: using EntityList = std::vector; World() = default; ~World(); EntityHandle CreateEntity(); EntityList CreateEntities(unsigned int count); void Clear(); void KillEntity(const EntityHandle& entity); void KillEntities(const EntityList& list); EntityHandle GetEntity(Entity::Id id); bool IsEntityValid(const EntityHandle& entity) const; bool IsEntityIdValid(Entity::Id id) const; void Update(); private: std::vector m_freeIdList; std::vector m_entities; EntityList m_aliveEntities; EntityList m_killedEntities; }; } #include #endif // NDK_WORLD_HPP