aboutsummaryrefslogtreecommitdiff
path: root/src/example/game.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-13 16:54:24 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-13 16:54:24 +0100
commit9bd81b51cc6d3ba428a29c7d0d90e289b7229878 (patch)
tree87e0169d7641ae3d806404a57fba19fedd62574b /src/example/game.cpp
parent9f0676acc2b67e8d3be3503797c0241147bf2489 (diff)
Improved game
Diffstat (limited to 'src/example/game.cpp')
-rw-r--r--src/example/game.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp
index 93c2f35..62e7732 100644
--- a/src/example/game.cpp
+++ b/src/example/game.cpp
@@ -346,10 +346,10 @@ public:
});
bg_2.add_component<Rigidbody>(Rigidbody::Data{
- .linear_velocity = vec2(-2, 0),
+ .linear_velocity = vec2(-0.5, 0),
});
bg_3.add_component<Rigidbody>(Rigidbody::Data{
- .linear_velocity = vec2(-1, 0),
+ .linear_velocity = vec2(-0.25, 0),
});
}
@@ -522,6 +522,9 @@ public:
.bg_color = Color::RED,
});
camera.add_component<BehaviorScript>().set_script<MoveCameraScript>();
+ camera.add_component<Rigidbody>(Rigidbody::Data{
+ .linear_velocity = vec2(2.5, 0),
+ });
}
string get_name() const { return "scene1"; }