aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
commitb5c4879189a8ff55434c8c04c14163dfda83de65 (patch)
tree17595782d04038818f7ed4f6bb2199949ebd30a0 /src/example
parentebe2fcfce52d9a303c5fa19d79554e20ac7f0bac (diff)
parent794efc4ef7a44b190a4d9ecc2dd84a66c62ab005 (diff)
Merge branch 'master' into niels/UI
Diffstat (limited to 'src/example')
-rw-r--r--src/example/game.cpp2
-rw-r--r--src/example/rendering_particle.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp
index 22effd2..3975650 100644
--- a/src/example/game.cpp
+++ b/src/example/game.cpp
@@ -86,7 +86,7 @@ class MyScript1 : public Script {
subscribe<KeyPressEvent>(
[this](const KeyPressEvent & ev) -> bool { return this->keypressed(ev); });
}
- void update() {
+ void update(duration_t) {
Rigidbody & tf = this->get_component<Rigidbody>();
Log::logf("linear_velocity.x {}", tf.data.linear_velocity.x);
Log::logf("linear_velocity.y {}", tf.data.linear_velocity.y);
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp
index 9cf25d7..07cfae2 100644
--- a/src/example/rendering_particle.cpp
+++ b/src/example/rendering_particle.cpp
@@ -39,6 +39,8 @@ public:
.angle_offset = 0,
.position_offset = {0, 1},
});
+ auto & emitter
+ = game_object.add_component<ParticleEmitter>(test_sprite, ParticleEmitter::Data{});
Sprite & test_sprite1
= game_object.add_component<Sprite>(img, Sprite::Data{