diff options
Diffstat (limited to 'game/workers/WorkersSubScene.cpp')
-rw-r--r-- | game/workers/WorkersSubScene.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/game/workers/WorkersSubScene.cpp b/game/workers/WorkersSubScene.cpp index 94d9848..5b070f8 100644 --- a/game/workers/WorkersSubScene.cpp +++ b/game/workers/WorkersSubScene.cpp @@ -1,4 +1,5 @@ #include "WorkersSubScene.h" +#include "PanicFromPlayer.h" #include "WorkerScript.h" #include "../Config.h" @@ -68,6 +69,7 @@ void WorkersSubScene::worker1(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); + worker_1.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_1_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -115,6 +117,7 @@ void WorkersSubScene::worker2(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); + worker_2.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_2_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -162,6 +165,7 @@ void WorkersSubScene::worker3(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); + worker_3.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_3_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -209,6 +213,7 @@ void WorkersSubScene::worker4(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_HIGH}, }); + worker_4.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_4_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -256,6 +261,7 @@ void WorkersSubScene::worker5(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_HIGH}, }); + worker_5.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_5_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -303,6 +309,7 @@ void WorkersSubScene::worker6(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); + worker_6.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_6_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -350,6 +357,7 @@ void WorkersSubScene::worker7(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); + worker_7.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_7_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -397,6 +405,7 @@ void WorkersSubScene::worker8(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); + worker_8.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); if (init_speed < 0) { worker_8_body_sprite.data.flip = Sprite::FlipSettings {true, false}; |