aboutsummaryrefslogtreecommitdiff
path: root/game/preview/NpcSubScene.cpp
diff options
context:
space:
mode:
authorheavydemon21 <48092678+heavydemon21@users.noreply.github.com>2025-01-10 20:08:37 +0100
committerGitHub <noreply@github.com>2025-01-10 20:08:37 +0100
commitba0db2e49ff1b5c3e952c00bbc3f31176397f6b6 (patch)
treeeefa561b81c48549277950692fdad714a2f501f2 /game/preview/NpcSubScene.cpp
parentb9d00961a8894356c7cff7597de424a12d2841a6 (diff)
parent16917357837916d1ef88b6122218fa0d567d1ddc (diff)
Merge pull request #131 from lonkaars/niels/game
Niels/game
Diffstat (limited to 'game/preview/NpcSubScene.cpp')
-rw-r--r--game/preview/NpcSubScene.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/game/preview/NpcSubScene.cpp b/game/preview/NpcSubScene.cpp
index bd6cfb2..c9ab5b6 100644
--- a/game/preview/NpcSubScene.cpp
+++ b/game/preview/NpcSubScene.cpp
@@ -15,11 +15,7 @@
using namespace crepe;
NpcSubScene::NpcSubScene(Scene & scn) {
- auto & savemgr = scn.get_save_manager();
- ValueBroker npc_x = savemgr.get<float>("npc_x", 500);
- ValueBroker npc_y = savemgr.get<float>("npc_y", 0);
-
- GameObject npc = scn.new_object("npc", "npc_tag", vec2 {npc_x.get(), npc_y.get()}, 0, 1);
+ GameObject npc = scn.new_object("npc", "npc_tag", vec2 {500, 0}, 0, 1);
Asset npc_body {"asset/workers/worker1Body.png"};
Asset npc_head {"asset/workers/worker1Head.png"};
@@ -61,7 +57,7 @@ NpcSubScene::NpcSubScene(Scene & scn) {
.body_type = Rigidbody::BodyType::DYNAMIC,
.linear_velocity = {-50, 0},
//.max_linear_velocity = 40,
- .collision_layers = {COLL_LAY_BOT_TOP, COLL_LAY_PLAYER},
+ .collision_layers = {COLL_LAY_BOT_TOP, COLL_LAY_PLAYER, 100},
.collision_layer = COLL_LAY_PLAYER,
});