From c17a1ac94186a2de6ad30e9228a031fb08434e52 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Fri, 10 Jan 2025 19:32:25 +0100 Subject: tiny adjustments for preview scene --- game/preview/PrevPlayerScript.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'game/preview/PrevPlayerScript.cpp') diff --git a/game/preview/PrevPlayerScript.cpp b/game/preview/PrevPlayerScript.cpp index 2657b8d..3e6eed4 100644 --- a/game/preview/PrevPlayerScript.cpp +++ b/game/preview/PrevPlayerScript.cpp @@ -1,12 +1,11 @@ #include "PrevPlayerScript.h" #include "../missile/SpawnEvent.h" -#include "api/Transform.h" + +#include #include #include #include -#include -#include using namespace crepe; @@ -59,16 +58,16 @@ bool PrevPlayerScript::key_pressed(const KeyPressEvent & ev) { this->head_anim->set_anim(7); break; case Keycode::LEFT: - this->head->data.angle_offset -= 1; + this->get_component().rotation += 10; break; case Keycode::RIGHT: - this->head->data.angle_offset += 1; + this->get_component().rotation -= 10; break; case Keycode::UP: - this->head->data.scale_offset += 0.1; + this->head->data.position_offset += 10; break; case Keycode::DOWN: - this->head->data.scale_offset -= 0.1; + this->head->data.position_offset -= 10; break; case Keycode::P: this->get_component().play(); @@ -98,11 +97,6 @@ bool PrevPlayerScript::key_pressed(const KeyPressEvent & ev) { case Keycode::M: trigger_event(MissileSpawnEvent {}); break; - //todo - case Keycode::PAGE_UP: - case Keycode::PAGE_DOWN: - case Keycode::HOME: - break; default: break; } -- cgit v1.2.3