alai/src/player/states/PlayerIdle.h

85 lines
2.2 KiB
C
Raw Normal View History

#ifndef JUEGO_PLAYER_IDLE_H
#define JUEGO_PLAYER_IDLE_H
#include "state_machine/State.h"
#include <Godot.hpp>
#include <Node.hpp>
#include <Input.hpp>
#include <AnimatedSprite.hpp>
namespace godot
{
namespace player
{
2022-04-13 00:59:23 -04:00
/**
* @brief This class controls what happens when the player is in the idle state.
*
*/
class PlayerIdle : public State
{
GODOT_CLASS(PlayerIdle, State)
private:
2022-04-13 00:59:23 -04:00
/**
* @brief Input singleton.
*
*/
Input *_input;
2022-04-13 00:59:23 -04:00
/**
* @brief The animated sprite of the player.
*
*/
AnimatedSprite *animated_sprite;
public:
2022-04-13 00:59:23 -04:00
/**
* @brief This method registers classes with Godot.
*
* @details This method registers methods, properties, and signals with the Godot engine.
*/
static void _register_methods();
2022-04-13 00:59:23 -04:00
/**
* @brief Construct a new Player Idle object.
*
*/
PlayerIdle();
2022-04-13 00:59:23 -04:00
/**
* @brief Destroy the Player Idle object.
*
*/
~PlayerIdle();
/**
* @brief Initialize the class from Godot.
2022-04-13 00:59:23 -04:00
*
* @details This method is called just once when the Godot engine connects to the instance of the class.
*/
void _init();
2022-04-13 00:59:23 -04:00
/**
* @brief Called when the idle state is entered.
*
*/
void _state_enter();
2022-04-13 00:59:23 -04:00
/**
* @brief Called when the idle state is exited.
*
*/
void _state_exit();
2022-04-13 00:59:23 -04:00
/**
* @brief The physics processed every delta time.
*
* @param[in] delta The time since the method was last run.
*/
void _physics_process(float delta);
};
}
}
#endif