Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "cgp/cgp.hpp"
#include "objects/projectile.hpp"
using namespace cgp;
struct projectiles {
int N;
std::vector<projectile> projectiles_prop;
std::vector<projectile::projectile_type> el_types = { projectile::projectile_type::fire, projectile::projectile_type::ice, projectile::projectile_type::rock, projectile::projectile_type::electric, projectile::projectile_type::water };
//Textures
image_structure fire_animation;
std::vector<image_structure> fire_grid;
mesh_drawable fireball;
image_structure water_animation;
std::vector<image_structure> water_grid;
mesh_drawable waterball;
image_structure ice_animation;
std::vector<image_structure> ice_grid;
mesh_drawable iceball;
image_structure electro_animation;
std::vector<image_structure> electro_grid;
mesh_drawable electroball;
image_structure rock_animation;
std::vector<image_structure> rock_grid;
mesh_drawable rockball;
mesh_drawable mesh;
void initialize();
void simulate(float dt);
void add_ball(vec3 new_pos, vec3 new_dir, int element);
void remove_ball(int i);
void reset();
};