diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-22 13:48:46 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-22 13:48:46 +0100 |
commit | 6a7e06f875d789af0e8f9b5ce0ad24b9eaa96d25 (patch) | |
tree | 07397ab46e2518fde4140777e2e181cde8ad938e /src/example/replay.cpp | |
parent | 296c80edd6727d6808ed0c98c001a8b456f1c037 (diff) | |
parent | 61148c757a1f742ff09e40e5347e74e638c7371c (diff) |
Merge branch 'master' into niels/UI
Diffstat (limited to 'src/example/replay.cpp')
-rw-r--r-- | src/example/replay.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/example/replay.cpp b/src/example/replay.cpp index 82fd478..00a6502 100644 --- a/src/example/replay.cpp +++ b/src/example/replay.cpp @@ -55,15 +55,20 @@ public: ComponentManager & mgr = mediator.component_manager; GameObject cam = mgr.new_object("cam"); - cam.add_component<Camera>(ivec2{640, 480}, vec2{3, 3}, - Camera::Data{ - .bg_color = Color::WHITE, - }); + cam.add_component<Camera>( + ivec2 {640, 480}, vec2 {3, 3}, + Camera::Data { + .bg_color = Color::WHITE, + } + ); GameObject square = mgr.new_object("square"); - square.add_component<Sprite>(Asset{"asset/texture/square.png"}, Sprite::Data{ - .size = {0.5, 0.5}, - }); + square.add_component<Sprite>( + Asset {"asset/texture/square.png"}, + Sprite::Data { + .size = {0.5, 0.5}, + } + ); square.add_component<BehaviorScript>().set_script<AnimationScript>(); GameObject scapegoat = mgr.new_object(""); |