MXVK Vulkan Framework 0.35.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
12 enum class GameMode { Intro, IntroFadeIn, Countdown, Playing };
13
14 enum class UfoSpriteSet : std::size_t { Classic = 0, Ufox = 1, Alien = 2 };
15
16 struct Ufo {
17 glm::vec3 position{0.0f};
18 glm::vec3 velocity{0.0f};
19 glm::vec4 tint{1.0f};
20 float base_size = 1.3f;
21 float phase = 0.0f;
22 float bob_speed = 1.0f;
23 float spin_speed = 1.0f;
24 float respawn_timer = 0.0f;
26 bool active = true;
27 };
28
29 struct Asteroid {
30 glm::vec3 position{0.0f};
31 glm::vec3 velocity{0.0f};
32 glm::vec3 rotation{0.0f};
33 glm::vec3 angular_velocity{0.0f};
34 float scale = 1.0f;
35 float collision_radius = 1.2f;
36 float respawn_timer = 0.0f;
37 bool active = false;
38 };
39
41 float min_x = -0.5f;
42 float max_x = 0.5f;
43 float min_y = -0.5f;
44 float max_y = 0.5f;
45 };
46
47} // namespace defender
48
49#endif
UfoSpriteSet sprite_set