diff options
Diffstat (limited to 'game/GameScene.cpp')
-rw-r--r-- | game/GameScene.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp index 2511567..551f4f1 100644 --- a/game/GameScene.cpp +++ b/game/GameScene.cpp @@ -3,6 +3,9 @@ #include "MoveCameraManualyScript.h" #include "PlayerSubScene.h" #include "StartGameScript.h" +#include "coins/CoinSubScene.h" +#include "coins/CoinPool.h" +#include "coins/CoinSystemScript.h" #include "background/BackgroundSubScene.h" @@ -36,7 +39,8 @@ void GameScene::load_scene() { } ); camera.add_component<BehaviorScript>().set_script<MoveCameraManualyScript>(); - camera.add_component<Rigidbody>(Rigidbody::Data {}); + camera.add_component<BehaviorScript>().set_script<CoinSystemScript>(); + camera.add_component<Rigidbody>(Rigidbody::Data{}); PlayerSubScene player(*this); @@ -66,6 +70,13 @@ void GameScene::load_scene() { GameObject start_game_script = new_object("start_game_script", "script", vec2(0, 0)); start_game_script.add_component<BehaviorScript>().set_script<StartGameScript>(); + + CoinSubScene coin; + coin.create(*this); + + CoinPool coin_system; + coin_system.create_coins(*this); + } string GameScene::get_name() const { return "scene1"; } |