MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
defender_entities.hpp
Go to the documentation of this file.
1#ifndef DEFENDER_ENTITIES_HPP
2#define DEFENDER_ENTITIES_HPP
3
4#include "defender_types.hpp"
5
6#include <cstddef>
7
8#include <glm/glm.hpp>
9
10namespace defender {
11
18
19 enum class UfoSpriteSet : std::size_t {
21 Ufox = 1,
23 };
24
25 struct Ufo {
26 glm::vec3 position{0.0f};
27 glm::vec3 velocity{0.0f};
28 glm::vec4 tint{1.0f};
29 float base_size = 1.3f;
30 float phase = 0.0f;
31 float bob_speed = 1.0f;
32 float spin_speed = 1.0f;
33 float respawn_timer = 0.0f;
35 bool active = true;
36 };
37
38 struct Asteroid {
39 glm::vec3 position{0.0f};
40 glm::vec3 velocity{0.0f};
41 glm::vec3 rotation{0.0f};
42 glm::vec3 angular_velocity{0.0f};
43 float scale = 1.0f;
44 float collision_radius = 1.2f;
45 float respawn_timer = 0.0f;
46 bool active = false;
47 };
48
50 float min_x = -0.5f;
51 float max_x = 0.5f;
52 float min_y = -0.5f;
53 float max_y = 0.5f;
54 };
55
56} // namespace defender
57
58#endif
UfoSpriteSet sprite_set