diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/PreviewScene.cpp | 6 | ||||
-rw-r--r-- | game/preview/PrevPlayerScript.cpp | 2 | ||||
-rw-r--r-- | game/preview/PrevPlayerSubScene.cpp | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/game/PreviewScene.cpp b/game/PreviewScene.cpp index 1179ffc..14a5560 100644 --- a/game/PreviewScene.cpp +++ b/game/PreviewScene.cpp @@ -77,15 +77,15 @@ void PreviewScene::load_scene() { .collision_layer = COLL_LAY_BOT_TOP, }); ceiling.add_component<BoxCollider>(vec2(INFINITY, 200)); - + GameObject world = this->new_object("world", "TAG", vec2 {0, 0}, 0, 1); world.add_component<Rigidbody>(Rigidbody::Data { .body_type = Rigidbody::BodyType::STATIC, .collision_layer = 100, }); - world.add_component<BoxCollider>(vec2(100,INFINITY), vec2(VIEWPORT_X,VIEWPORT_Y)); - world.add_component<BoxCollider>(vec2(100,INFINITY), vec2(100,VIEWPORT_Y)); + world.add_component<BoxCollider>(vec2(100, INFINITY), vec2(VIEWPORT_X, VIEWPORT_Y)); + world.add_component<BoxCollider>(vec2(100, INFINITY), vec2(100, VIEWPORT_Y)); PrevPlayerSubScene player(*this); NpcSubScene npc(*this); diff --git a/game/preview/PrevPlayerScript.cpp b/game/preview/PrevPlayerScript.cpp index 3e6eed4..fce5c5a 100644 --- a/game/preview/PrevPlayerScript.cpp +++ b/game/preview/PrevPlayerScript.cpp @@ -2,9 +2,9 @@ #include "../missile/SpawnEvent.h" -#include <crepe/api/Transform.h> #include <crepe/api/AudioSource.h> #include <crepe/api/Camera.h> +#include <crepe/api/Transform.h> #include <crepe/manager/SaveManager.h> using namespace crepe; diff --git a/game/preview/PrevPlayerSubScene.cpp b/game/preview/PrevPlayerSubScene.cpp index 3f5a5d5..9ff111c 100644 --- a/game/preview/PrevPlayerSubScene.cpp +++ b/game/preview/PrevPlayerSubScene.cpp @@ -17,8 +17,7 @@ using namespace crepe; PrevPlayerSubScene::PrevPlayerSubScene(Scene & scn) { - GameObject player - = scn.new_object("player", "player", vec2 {800 , -100}, 0, 1); + GameObject player = scn.new_object("player", "player", vec2 {800, -100}, 0, 1); Asset player_body_asset {"asset/barry/defaultBody.png"}; Sprite & player_body_sprite = player.add_component<Sprite>( player_body_asset, |