From 1c98c75cf9fed246838c9cac98f43487e1e4cbaa Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Sat, 1 Jul 2023 20:15:33 +0200 Subject: [PATCH] Removed temporary testing setup --- src/game/collectables/collectable.cpp | 25 ------------------------- src/game/collectables/collectable.hpp | 3 +-- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/game/collectables/collectable.cpp b/src/game/collectables/collectable.cpp index c2bba11..d87c374 100644 --- a/src/game/collectables/collectable.cpp +++ b/src/game/collectables/collectable.cpp @@ -32,28 +32,3 @@ void Collectable::setSprite(const std::string &spriteName) // Set half size offset of coordinates coordinates->move(IsometricCoordinates(0, -sizeWidth / 2.f, 0)); } - -void Collectable::update() -{ - GameObject::update(); - - // TODO: Remove this - if (InputMapper::getInstance()->getInputIdentities().empty()) - { - return; - } - - std::shared_ptr inputIdentity = InputMapper::getInstance()->getInputIdentity( - InputDeviceGroup::KEYBOARD_WASD); - - // Rotate based on grow/shrink input - if (inputIdentity->isPerformingAction(GameAction::GROW)) - { - angle += 10.f; - } else if (inputIdentity->isPerformingAction(GameAction::SHRINK)) - { - angle -= 10.f; - } - - setRotation(angle); -} diff --git a/src/game/collectables/collectable.hpp b/src/game/collectables/collectable.hpp index 972b36d..c9cf27b 100644 --- a/src/game/collectables/collectable.hpp +++ b/src/game/collectables/collectable.hpp @@ -13,14 +13,13 @@ public: void setRotation(float angle); - void update() override; - float getDepth() const; int getId() const { return collectableId; } + private: int collectableId = 0; static inline int collectableCount = 0;