R-Type
Networked shoot'em up built on Aegis2D
Loading...
Searching...
No Matches
rtype::ScriptedInputs Class Reference

Plays an input script from the first call to update(), looping at its end. More...

#include </__w/project-rtype/project-rtype/tools/bot/include/rtype/input_script.hpp>

Public Types

using Clock = std::chrono::steady_clock
 Clock of the steps.
 

Public Member Functions

 ScriptedInputs (InputScript script)
 Creates the player of a script.
 
aegis2d::ecs::PlayerInput update (Clock::time_point now)
 The input to hold now, by the time since the first call.
 
std::uint64_t picks () const noexcept
 Number of steps started.
 

Detailed Description

Plays an input script from the first call to update(), looping at its end.

Member Typedef Documentation

◆ Clock

using rtype::ScriptedInputs::Clock = std::chrono::steady_clock

Clock of the steps.

Constructor & Destructor Documentation

◆ ScriptedInputs()

rtype::ScriptedInputs::ScriptedInputs ( InputScript  script)
explicit

Creates the player of a script.

Parameters
scriptScript to play; one without steps holds nothing.

Member Function Documentation

◆ picks()

std::uint64_t rtype::ScriptedInputs::picks ( ) const
noexcept

Number of steps started.

Returns
The count since the first call, the repeats included.

◆ update()

aegis2d::ecs::PlayerInput rtype::ScriptedInputs::update ( Clock::time_point  now)

The input to hold now, by the time since the first call.

Parameters
nowCurrent time.
Returns
The held actions.

The documentation for this class was generated from the following file: