aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
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{