Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
components.hpp
Go to the documentation of this file.
1
3#pragma once
4
5namespace aegis2d::shmup {
6
8struct PlayerShip {
10 float speed = 300.0F;
11};
12
18struct Weapon {
20 float cooldown = 0.25F;
22 float reload = 0.0F;
23};
24
31struct AutoTrigger {};
32
33} // namespace aegis2d::shmup
Shoot'em up building blocks on top of the ECS: player ships, their controls, weapons and their shots....
Definition components.hpp:5
Weapon that fires on its own, as soon as it is reloaded (enemies).
Definition components.hpp:31
Ship steered by a player's input (ecs::PlayerInput).
Definition components.hpp:8
float speed
Speed in logical pixels per second, the same in every direction.
Definition components.hpp:10
Gun of a ship: how often it can fire.
Definition components.hpp:18
float cooldown
Seconds between two shots.
Definition components.hpp:20
float reload
Seconds before the next shot is allowed; 0 when ready.
Definition components.hpp:22