2022-04-20 11:48:11 -04:00
|
|
|
#ifndef ALAI_CAMERA_LIMIT_H
|
|
|
|
#define ALAI_CAMERA_LIMIT_H
|
|
|
|
|
|
|
|
#include <Godot.hpp>
|
|
|
|
#include <Node2D.hpp>
|
|
|
|
|
2022-08-26 19:27:57 -04:00
|
|
|
namespace alai
|
2022-04-20 11:48:11 -04:00
|
|
|
{
|
2022-04-22 14:13:39 -04:00
|
|
|
/**
|
|
|
|
* @brief This class limits the camera's position.
|
|
|
|
*
|
|
|
|
* @details The camera will be limited based on the used width and height of the Middleground tilemap.
|
|
|
|
*/
|
2022-10-10 21:54:12 -03:00
|
|
|
class CameraLimit : public godot::Node2D
|
2022-04-20 11:48:11 -04:00
|
|
|
{
|
2022-10-10 21:54:12 -03:00
|
|
|
GODOT_CLASS(CameraLimit, godot::Node2D)
|
2022-04-20 11:48:11 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @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-22 21:56:22 -04:00
|
|
|
* @brief Construct a new CameraLimit object.
|
2022-04-20 11:48:11 -04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
CameraLimit();
|
|
|
|
|
|
|
|
/**
|
2022-04-22 21:56:22 -04:00
|
|
|
* @brief Destroy the CameraLimit object.
|
2022-04-20 11:48:11 -04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
~CameraLimit();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialize the class from Godot.
|
|
|
|
*
|
|
|
|
* @details This method is called just once when the Godot engine connects to the instance of the class.
|
|
|
|
*/
|
|
|
|
void _init();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Code to be run when ready.
|
|
|
|
*
|
|
|
|
* @details This method is run when all the children of this node are ready.
|
|
|
|
*/
|
|
|
|
void _ready();
|
|
|
|
};
|
2022-10-10 21:54:12 -03:00
|
|
|
} // namespace alai
|
2022-04-20 11:48:11 -04:00
|
|
|
#endif
|