aboutsummaryrefslogtreecommitdiff
path: root/src/example/GameScene.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-17 14:34:18 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-17 14:34:18 +0100
commitf2a95686ec6d33d15f38fef4420700cefc875e89 (patch)
tree7d4795de7abfce70dd58ee8e9e8c019112dbbe83 /src/example/GameScene.cpp
parentf7b8062d6a33195bfc43af0f2a7b6c16a388b588 (diff)
Made wall fragments for start
Diffstat (limited to 'src/example/GameScene.cpp')
-rw-r--r--src/example/GameScene.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/example/GameScene.cpp b/src/example/GameScene.cpp
index 343f26c..5ab4be0 100644
--- a/src/example/GameScene.cpp
+++ b/src/example/GameScene.cpp
@@ -56,6 +56,17 @@ public:
Sprite & hole_sprite = this->get_components_by_name<Sprite>("start_hole").front();
hole_sprite.active = true;
+ RefVector<Rigidbody> frags_rg
+ = this->get_components_by_tag<Rigidbody>("wall_fragment");
+ RefVector<Sprite> frags_sprite
+ = this->get_components_by_tag<Sprite>("wall_fragment");
+ for (Rigidbody & frag_rg : frags_rg) {
+ frag_rg.active = true;
+ }
+ for (Sprite & frag_sprite : frags_sprite) {
+ frag_sprite.active = true;
+ }
+
this->created_hole = true;
}