4#include <aegis2d/core/math.hpp>
5#include <aegis2d/ecs/components.hpp>
6#include <aegis2d/ecs/registry.hpp>
7#include <aegis2d/ecs/system.hpp>
28[[nodiscard]] aegis2d::Vec2
ship_velocity(aegis2d::ecs::PlayerInput input)
noexcept;
47 float delta)
noexcept;
54void steer_ships(aegis2d::ecs::Registry& registry,
const aegis2d::ecs::Tick& tick);
R-Type game code, built on the Aegis2D engine.
Definition enemy_scripts.hpp:16
aegis2d::Vec2 ship_velocity(aegis2d::ecs::PlayerInput input) noexcept
Velocity of a player ship holding an input.
void steer_ships(aegis2d::ecs::Registry ®istry, const aegis2d::ecs::Tick &tick)
System that sets the velocity of every player ship from its input.
void keep_ships_in_area(aegis2d::ecs::Registry ®istry, const aegis2d::ecs::Tick &tick)
System that keeps every player ship inside the play area.
aegis2d::Vec2 keep_ship_in_area(aegis2d::Vec2 position) noexcept
Keeps a player ship inside the play area.
ShipMotion step_ship(aegis2d::Vec2 position, aegis2d::ecs::PlayerInput input, float delta) noexcept
Moves a player ship by one tick.
Where a player ship is and how it moves, after a step.
Definition ship_movement.hpp:12
aegis2d::Vec2 velocity
Velocity, in logical pixels per second.
Definition ship_movement.hpp:16
aegis2d::Vec2 position
Center of the ship, in logical pixels.
Definition ship_movement.hpp:14
bool operator==(const ShipMotion &) const =default
Field-by-field equality.