spawning objects

This commit is contained in:
DanielProl1xy 2024-02-19 10:10:53 +03:00
parent f717e1c109
commit cce4bfb637
2 changed files with 5 additions and 2 deletions

View File

@ -48,6 +48,9 @@ public:
World* getWorld(); World* getWorld();
// Spawns object of class T and returns pointer to it.
// @param T class that derives the Object class
// @param args pass arguments needed for T class constructor
template<class T, typename... Args> template<class T, typename... Args>
std::shared_ptr<T> spawnObject(Args&&... args); std::shared_ptr<T> spawnObject(Args&&... args);
}; };