separació per entitats
This commit is contained in:
@@ -5,8 +5,12 @@
|
||||
#ifndef JOC_ASTEROIDES_HPP
|
||||
#define JOC_ASTEROIDES_HPP
|
||||
|
||||
#include "core/rendering/polygon_renderer.hpp"
|
||||
#include "core/types.hpp"
|
||||
#include "game/constants.hpp"
|
||||
#include "game/entities/bala.hpp"
|
||||
#include "game/entities/enemic.hpp"
|
||||
#include "game/entities/nau.hpp"
|
||||
#include <SDL3/SDL.h>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
@@ -26,21 +30,13 @@ private:
|
||||
SDL_Renderer *renderer_;
|
||||
|
||||
// Estat del joc
|
||||
Triangle nau_;
|
||||
std::array<Poligon, Constants::MAX_ORNIS> orni_;
|
||||
std::array<Poligon, Constants::MAX_BALES> bales_;
|
||||
Nau nau_;
|
||||
std::array<Enemic, Constants::MAX_ORNIS> orni_;
|
||||
std::array<Bala, Constants::MAX_BALES> bales_;
|
||||
Poligon chatarra_cosmica_;
|
||||
uint16_t itocado_;
|
||||
|
||||
// Funcions de dibuix
|
||||
bool linea(int x1, int y1, int x2, int y2, bool dibuixar);
|
||||
void rota_tri(const Triangle &tri, float angul, float velocitat,
|
||||
bool dibuixar);
|
||||
void rota_pol(const Poligon &pol, float angul, bool dibuixar);
|
||||
|
||||
// Moviment
|
||||
void mou_orni(Poligon &orni, float delta_time);
|
||||
void mou_bales(Poligon &bala, float delta_time);
|
||||
// Funcions privades
|
||||
void tocado();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user