LOGO explota
This commit is contained in:
@@ -3,37 +3,40 @@
|
||||
// © 2025 Port a C++20 amb SDL3
|
||||
|
||||
#pragma once
|
||||
#include "core/graphics/shape.hpp"
|
||||
#include "core/types.hpp"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "core/graphics/shape.hpp"
|
||||
#include "core/types.hpp"
|
||||
|
||||
class Bala {
|
||||
public:
|
||||
Bala() : renderer_(nullptr) {}
|
||||
Bala(SDL_Renderer *renderer);
|
||||
public:
|
||||
Bala()
|
||||
: renderer_(nullptr) {}
|
||||
Bala(SDL_Renderer* renderer);
|
||||
|
||||
void inicialitzar();
|
||||
void disparar(const Punt &posicio, float angle);
|
||||
void actualitzar(float delta_time);
|
||||
void dibuixar() const;
|
||||
void inicialitzar();
|
||||
void disparar(const Punt& posicio, float angle);
|
||||
void actualitzar(float delta_time);
|
||||
void dibuixar() const;
|
||||
|
||||
// Getters (API pública sense canvis)
|
||||
bool esta_activa() const { return esta_; }
|
||||
const Punt &get_centre() const { return centre_; }
|
||||
void desactivar() { esta_ = false; }
|
||||
// Getters (API pública sense canvis)
|
||||
bool esta_activa() const { return esta_; }
|
||||
const Punt& get_centre() const { return centre_; }
|
||||
void desactivar() { esta_ = false; }
|
||||
|
||||
private:
|
||||
SDL_Renderer *renderer_;
|
||||
private:
|
||||
SDL_Renderer* renderer_;
|
||||
|
||||
// [NUEVO] Forma vectorial (compartida entre totes les bales)
|
||||
std::shared_ptr<Graphics::Shape> forma_;
|
||||
// [NUEVO] Forma vectorial (compartida entre totes les bales)
|
||||
std::shared_ptr<Graphics::Shape> forma_;
|
||||
|
||||
// [NUEVO] Estat de la instància (separat de la geometria)
|
||||
Punt centre_;
|
||||
float angle_;
|
||||
float velocitat_;
|
||||
bool esta_;
|
||||
// [NUEVO] Estat de la instància (separat de la geometria)
|
||||
Punt centre_;
|
||||
float angle_;
|
||||
float velocitat_;
|
||||
bool esta_;
|
||||
|
||||
void mou(float delta_time);
|
||||
void mou(float delta_time);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user