diff options
-rw-r--r-- | examples/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/engine/entities.json | 23 | ||||
-rw-r--r-- | tests/engine/test.cpp | 1 | ||||
-rw-r--r-- | yage/engine/system.h | 5 |
4 files changed, 29 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 156b6a34..7222d507 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -8,3 +8,4 @@ endfunction(make_example) make_example(simplegame) make_example(shooter) +make_example(render3d) diff --git a/tests/engine/entities.json b/tests/engine/entities.json new file mode 100644 index 00000000..25959311 --- /dev/null +++ b/tests/engine/entities.json @@ -0,0 +1,23 @@ +{ + "Entities": [ + { + "name": "Object1", + "mass": "Hello", + "position": [ + 0, + 0, + 0 + ], + "velocity": [ + 0, + 0, + 0 + ], + "acceleration": [ + 0, + 0, + 0 + ] + } + ] +} diff --git a/tests/engine/test.cpp b/tests/engine/test.cpp index 6026e40a..be8e6782 100644 --- a/tests/engine/test.cpp +++ b/tests/engine/test.cpp @@ -8,7 +8,6 @@ int main() auto entity = space.createEntity(); auto entity2 = space.createEntity(); auto entity3 = space.createEntity(); - auto entity4 = space.createEntity(); yLogInfo << "Entity 1: " << entity; diff --git a/yage/engine/system.h b/yage/engine/system.h index 32d6fc34..9100fa17 100644 --- a/yage/engine/system.h +++ b/yage/engine/system.h @@ -36,6 +36,11 @@ public: * @param dt The time difference between the previous frame and the current one. */ virtual void update(double dt) = 0; + + /** + * Destroy the system and the components that are contained in it. + */ + virtual void destroy() = 0; }; /** |