migrant a SDL3
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <SDL3/SDL_stdinc.h> // Para Uint8
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
@@ -27,17 +28,17 @@ class Bullet
|
||||
{
|
||||
private:
|
||||
// Constantes
|
||||
static constexpr int BULLET_WIDTH_ = 12;
|
||||
static constexpr int BULLET_HEIGHT_ = 12;
|
||||
static constexpr int BULLET_VEL_Y_ = -3;
|
||||
static constexpr int BULLET_VEL_X_LEFT_ = -2;
|
||||
static constexpr int BULLET_VEL_X_RIGHT_ = 2;
|
||||
static constexpr float BULLET_WIDTH_ = 12.0f;
|
||||
static constexpr float BULLET_HEIGHT_ = 12.0f;
|
||||
static constexpr float BULLET_VEL_Y_ = -3.0f;
|
||||
static constexpr float BULLET_VEL_X_LEFT_ = -2.0f;
|
||||
static constexpr float BULLET_VEL_X_RIGHT_ = 2.0f;
|
||||
|
||||
std::unique_ptr<Sprite> sprite_; // Sprite con los gráficos y métodos de pintado
|
||||
|
||||
int pos_x_; // Posición en el eje X
|
||||
int pos_y_; // Posición en el eje Y
|
||||
int vel_x_; // Velocidad en el eje X
|
||||
float pos_x_; // Posición en el eje X
|
||||
float pos_y_; // Posición en el eje Y
|
||||
float vel_x_; // Velocidad en el eje X
|
||||
|
||||
BulletType bullet_type_; // Tipo de objeto
|
||||
int owner_; // Identificador del dueño del objeto
|
||||
@@ -48,7 +49,7 @@ private:
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Bullet(int x, int y, BulletType bullet_type, bool powered_up, int owner, std::shared_ptr<Texture> texture);
|
||||
Bullet(float x, float y, BulletType bullet_type, bool powered_up, int owner, std::shared_ptr<Texture> texture);
|
||||
|
||||
// Destructor
|
||||
~Bullet() = default;
|
||||
|
||||
Reference in New Issue
Block a user