diff --git a/src/interfaces/Object.h b/src/interfaces/Object.h index 5f9aae83..5ffe1cb6 100644 --- a/src/interfaces/Object.h +++ b/src/interfaces/Object.h @@ -17,9 +17,9 @@ public: ~Object() { destroyed(); } public: - virtual void spawned() { } + virtual void spawned() { } virtual void update(float delta) { } - virtual void destroyed() { } + virtual void destroyed() { } }; #endif /* OBJECT_H */ \ No newline at end of file diff --git a/src/world/Level.h b/src/world/Level.h index da7f4ce1..fbf9d283 100644 --- a/src/world/Level.h +++ b/src/world/Level.h @@ -48,6 +48,9 @@ public: 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 std::shared_ptr spawnObject(Args&&... args); };