From 1fdfca5bb749eab76928ccfaaf33a9d971fa1d4d Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 22 Mar 2024 00:15:34 +0100 Subject: [PATCH] feat: added getter for character to tunnels player --- src/tunnels_player.cpp | 4 ++++ src/tunnels_player.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/tunnels_player.cpp b/src/tunnels_player.cpp index 1789296..843f9f8 100644 --- a/src/tunnels_player.cpp +++ b/src/tunnels_player.cpp @@ -169,6 +169,10 @@ Ref TunnelsPlayer::get_camera_rotation_ramp() const { return this->camera_rotation_ramp; } +PlayerCharacter *TunnelsPlayer::get_character() const { + return this->character; +} + float const TunnelsPlayer::ROTATION_SPEED{0.5f}; float const TunnelsPlayer::ROTATION_Y_MIN_INFLUENCE{7.f}; float const TunnelsPlayer::ROTATION_MARGIN{0.4f}; diff --git a/src/tunnels_player.hpp b/src/tunnels_player.hpp index 6cf7545..41e3ad6 100644 --- a/src/tunnels_player.hpp +++ b/src/tunnels_player.hpp @@ -43,6 +43,8 @@ public: void set_camera_rotation_ramp(Ref curve); Ref get_camera_rotation_ramp() const; + + PlayerCharacter *get_character() const; private: Vector2 move_input{0,0}; Vector2 mouse_location{0,0};