ICT290 / src / scene / entities / player.h
player.h
Raw
#pragma once

#include "../../engine/camera.h"
#include "../../engine/object.h"

class Player {
   public:
    void update(Object& playerObject, Camera_& topDownCamera, float deltaTime);

    void moveUp();
    void moveDown();
    void moveLeft();
    void moveRight();

    void setMoveSpeed(float incMoveSpeed);
    float getMoveSpeed() const;

    void setZoom(float newZoom);
    float getZoom() const;

   private:
    struct Direction {
        bool up = false;
        bool down = false;
        bool left = false;
        bool right = false;
    };

    Direction currentDirection;
    float speed = 5.f;
    float zoom = 5.f;
    float targetZoom = 5.f;
};