diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-28 16:22:58 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-28 16:22:58 +0100 |
commit | 26d66b7a73ac8d172d342be03bd75bd5bea221e1 (patch) | |
tree | 8814afa7859bf7d142b475acec4432e254e204c8 /game/GameScene.cpp | |
parent | 6a3063e6012bae44457b668ce48c48b8af90a95d (diff) |
coin system
Diffstat (limited to 'game/GameScene.cpp')
-rw-r--r-- | game/GameScene.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp index c280474..3d692f8 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/CoinSystem.h" +#include "coins/CoinSystemScript.h" #include <cmath> #include <crepe/api/Animator.h> @@ -33,6 +36,7 @@ void GameScene::load_scene() { .bg_color = Color::RED, }); camera.add_component<BehaviorScript>().set_script<MoveCameraManualyScript>(); + camera.add_component<BehaviorScript>().set_script<CoinSystemScript>(); camera.add_component<Rigidbody>(Rigidbody::Data{}); PlayerSubScene player(*this); @@ -50,6 +54,14 @@ 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); + + // CoinSystem coin_system; + // coin_system.create_coins(*this); + // coin_system.add_location({900,0}); + } string GameScene::get_name() const { return "scene1"; } |