aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-07 10:08:47 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-07 10:08:47 +0100
commit725bb89cd3690d396502ab90baa35fa4eec6fe98 (patch)
tree8b47952b9b58e076bf631f353f2a05d56ccff64f
parentf8496d3d48beeb6e0c5ef8dc82e16d281c94148e (diff)
`make format`
-rw-r--r--game/GameScene.cpp2
-rw-r--r--game/prefab/ZapperObject.cpp23
-rw-r--r--src/crepe/api/Vector2.hpp1
3 files changed, 10 insertions, 16 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp
index 71612e3..dc0038b 100644
--- a/game/GameScene.cpp
+++ b/game/GameScene.cpp
@@ -19,8 +19,8 @@
#include "MoveCameraManualyScript.h"
#include "StartGameScript.h"
-#include "background/BackgroundSubScene.h"
#include "PlayerSubScene.h"
+#include "background/BackgroundSubScene.h"
#include "prefab/ZapperObject.h"
using namespace crepe;
diff --git a/game/prefab/ZapperObject.cpp b/game/prefab/ZapperObject.cpp
index f70415c..8df2075 100644
--- a/game/prefab/ZapperObject.cpp
+++ b/game/prefab/ZapperObject.cpp
@@ -1,7 +1,7 @@
#include <crepe/api/Transform.h>
-#include "ZapperObject.h"
#include "Config.h"
+#include "ZapperObject.h"
using namespace crepe;
@@ -73,18 +73,14 @@ ZapperObject::ZapperObject(crepe::GameObject && base)
.glow_end = add_component<Animator>(
sprite.glow_end, ivec2(128, 128), uvec2(16, 1), animator.glow_start.data
),
- },
- body {
- add_component<Rigidbody>(Rigidbody::Data {
- .body_type = Rigidbody::BodyType::KINEMATIC,
- .kinematic_collision = false,
- })
- },
- collider {
- add_component<BoxCollider>(vec2(0, 0))
- } {
- this->place(this->transform.position, 0, 300);
- }
+ },
+ body {add_component<Rigidbody>(Rigidbody::Data {
+ .body_type = Rigidbody::BodyType::KINEMATIC,
+ .kinematic_collision = false,
+ })},
+ collider {add_component<BoxCollider>(vec2(0, 0))} {
+ this->place(this->transform.position, 0, 300);
+}
void ZapperObject::place(const crepe::vec2 & position, float rotation, float length) {
this->transform.position = position;
@@ -101,4 +97,3 @@ void ZapperObject::place(const crepe::vec2 & position, float rotation, float len
this->collider.dimensions = offset.rotate(rotation) * 2 + vec2(30, 30) * SCALE;
}
-
diff --git a/src/crepe/api/Vector2.hpp b/src/crepe/api/Vector2.hpp
index a4ce641..5709f46 100644
--- a/src/crepe/api/Vector2.hpp
+++ b/src/crepe/api/Vector2.hpp
@@ -177,5 +177,4 @@ Vector2<T> Vector2<T>::rotate(float deg) const {
};
}
-
} // namespace crepe