|
R-Type
2
Doom but in better
|


Go to the source code of this file.
Functions | |
| void | weapon_system (Registry &r, ComponentContainer< Weapon > &weapons, ComponentContainer< Position > &positions, ComponentContainer< Type > &types) |
| Handles the firing of weapons and updates their states. | |
| void | make_shot (Registry &r, std::size_t id) |
| Changes the state of the weapon. | |
| void make_shot | ( | Registry & | r, |
| std::size_t | id ) |
Changes the state of the weapon.
| r | The Registry that contains all game entities and their components. |
| id | The id of the entity. |
Definition at line 23 of file WeaponSystem.cpp.
| void weapon_system | ( | Registry & | r, |
| ComponentContainer< Weapon > & | weapons, | ||
| ComponentContainer< Position > & | positions, | ||
| ComponentContainer< Type > & | types ) |
Handles the firing of weapons and updates their states.
This system manages the firing mechanism of entities that possess a Weapon component. It checks if the entity is ready to fire based on the weapon's cooldown time and fire rate. When an entity fires a weapon, a missile or projectile is spawned, and the weapon's cooldown timer is reset.
| r | The Registry that contains all game entities and their components. |
| weapons | The container of the component Weapon. |
| positions | The container of the component Position. |
| types | The container of the component Type. |
Definition at line 6 of file WeaponSystem.cpp.