aboutsummaryrefslogtreecommitdiff
path: root/game/player/PlayerSubScene.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 14:50:04 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-08 14:50:04 +0100
commit0de6692dcb029540f4502c5a2f1a0c6634f7b61f (patch)
tree001f373de315b651704b8b264e20314bc878e288 /game/player/PlayerSubScene.cpp
parenta4b9e948ac0acd14d82e009a75e1fccdddeeab9b (diff)
start of extra features and restored player functions
Diffstat (limited to 'game/player/PlayerSubScene.cpp')
-rw-r--r--game/player/PlayerSubScene.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/game/player/PlayerSubScene.cpp b/game/player/PlayerSubScene.cpp
index cf11162..c4d689a 100644
--- a/game/player/PlayerSubScene.cpp
+++ b/game/player/PlayerSubScene.cpp
@@ -22,7 +22,7 @@ using namespace crepe;
using namespace std;
PlayerSubScene::PlayerSubScene(Scene & scn) {
- GameObject player = scn.new_object("player", "player", vec2(300, 200));
+ GameObject player = scn.new_object("player", "player", vec2(-100, 200));
Asset player_bullet {"asset/other_effects/effect_smgbullet.png"};
Sprite & player_bullet_sprite = player.add_component<Sprite>(
@@ -147,13 +147,13 @@ PlayerSubScene::PlayerSubScene(Scene & scn) {
player.add_component<Rigidbody>(Rigidbody::Data {
.gravity_scale = PLAYER_GRAVITY_SCALE,
.body_type = Rigidbody::BodyType::DYNAMIC,
- //.linear_velocity = vec2(PLAYER_SPEED * 0.02, 0),
+ .linear_velocity = vec2(PLAYER_SPEED * 0.02, 0),
.collision_layers
= {COLL_LAY_BOT_TOP, COLL_LAY_ZAPPER, COLL_LAY_LASER, COLL_LAY_MISSILE, COLL_LAY_BULLET
},
.collision_layer = COLL_LAY_PLAYER,
});
- player.add_component<BehaviorScript>().set_script<PlayerScript>().active = true;
+ player.add_component<BehaviorScript>().set_script<PlayerScript>().active = false;
player.add_component<BehaviorScript>().set_script<CoinScript>();
player.add_component<BehaviorScript>().set_script<PlayerEndScript>().active = false;