forked from jaildesigner-jailgames/jaildoctors_dilemma
fix: inicialitzacions
This commit is contained in:
@@ -13,15 +13,15 @@ class Enemy {
|
||||
/* [DOC:29/10/2025] la surface ara se pillarà del .ANI
|
||||
std::string surface_path{}; // Ruta al fichero con la textura
|
||||
[/DOC] */
|
||||
std::string animation_path{}; // Ruta al fichero con la animación
|
||||
std::string animation_path; // Ruta al fichero con la animación
|
||||
/* [DOC:29/10/2025] w i h ja no fan falta, se pilla del .ANI
|
||||
int w = 0; // Anchura del enemigo
|
||||
int h = 0; // Altura del enemigo
|
||||
[/DOC] */
|
||||
float x = 0.0f; // Posición inicial en el eje X
|
||||
float y = 0.0f; // Posición inicial en el eje Y
|
||||
float vx = 0.0f; // Velocidad en el eje X
|
||||
float vy = 0.0f; // Velocidad en el eje Y
|
||||
float x = 0.0F; // Posición inicial en el eje X
|
||||
float y = 0.0F; // Posición inicial en el eje Y
|
||||
float vx = 0.0F; // Velocidad en el eje X
|
||||
float vy = 0.0F; // Velocidad en el eje Y
|
||||
int x1 = 0; // Límite izquierdo de la ruta en el eje X
|
||||
int x2 = 0; // Límite derecho de la ruta en el eje X
|
||||
int y1 = 0; // Límite superior de la ruta en el eje Y
|
||||
@@ -29,7 +29,7 @@ class Enemy {
|
||||
bool flip = false; // Indica si el enemigo hace flip al terminar su ruta
|
||||
bool mirror = false; // Indica si el enemigo está volteado verticalmente
|
||||
int frame = 0; // Frame inicial para la animación del enemigo
|
||||
std::string color{}; // Color del enemigo
|
||||
std::string color; // Color del enemigo
|
||||
|
||||
// Constructor por defecto
|
||||
Data() = default;
|
||||
|
||||
@@ -46,18 +46,18 @@ class Player {
|
||||
};
|
||||
|
||||
struct Data {
|
||||
SpawnData spawn_data{};
|
||||
SpawnData spawn_data;
|
||||
//std::string texture_path{};
|
||||
std::string animations_path{};
|
||||
std::string animations_path;
|
||||
std::shared_ptr<Room> room = nullptr;
|
||||
|
||||
// Constructor por defecto
|
||||
Data() = default;
|
||||
|
||||
// Constructor con parámetros
|
||||
Data(SpawnData spawn_data, std::string texture_path, std::string animations_path, std::shared_ptr<Room> room)
|
||||
: spawn_data(std::move(spawn_data)),
|
||||
//texture_path(std::move(texture_path)),
|
||||
Data(SpawnData spawn_data, const std::string& texture_path, std::string animations_path, std::shared_ptr<Room> room)
|
||||
: spawn_data(spawn_data),
|
||||
// texture_path(std::move(texture_path)),
|
||||
animations_path(std::move(animations_path)),
|
||||
room(std::move(room)) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user