afegit segon jugador
This commit is contained in:
@@ -17,13 +17,14 @@ class Bala {
|
||||
Bala(SDL_Renderer* renderer);
|
||||
|
||||
void inicialitzar();
|
||||
void disparar(const Punt& posicio, float angle);
|
||||
void disparar(const Punt& posicio, float angle, uint8_t owner_id);
|
||||
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_; }
|
||||
uint8_t get_owner_id() const { return owner_id_; }
|
||||
void desactivar() { esta_ = false; }
|
||||
|
||||
private:
|
||||
@@ -37,6 +38,7 @@ class Bala {
|
||||
float angle_;
|
||||
float velocitat_;
|
||||
bool esta_;
|
||||
uint8_t owner_id_; // 0=P1, 1=P2
|
||||
float brightness_; // Factor de brillantor (0.0-1.0)
|
||||
|
||||
void mou(float delta_time);
|
||||
|
||||
Reference in New Issue
Block a user