Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
weapons.hpp
Go to the documentation of this file.
1
4#pragma once
6
7namespace aegis2d::ecs {
11} // namespace aegis2d::ecs
Entity-Component-System used by client and server.
Definition animation.hpp:13
bool pull_trigger(Weapon &weapon, float delta, bool pulled) noexcept
Counts a weapon's reload down by one tick and fires it if the trigger is pulled.
Definition weapons.hpp:27
void trigger_auto_weapons(ecs::Registry &registry, const ecs::Tick &tick, std::vector< ecs::Entity > &shooters)
Finds the entities that fire on their own during this tick and reloads them.
Definition weapons.hpp:72
void trigger_weapons(ecs::Registry &registry, const ecs::Tick &tick, std::vector< ecs::Entity > &shooters)
Finds the ships that fire during this tick and reloads their weapons.
Definition weapons.hpp:48
Weapons: fire rate enforced by the server, for players and for enemies that fire on their own,...