Jazz2::Editor::PlayPath struct

Path the player took in a play-test, for the editor to show.

Public types

struct Segment
Part of the path without a break.
enum class Break : std::uint8_t { None, Died, Warped, Exited }
What ended a segment of the path.

Public static variables

static std::int32_t MaxPoints constexpr
Most points kept, the oldest are dropped.

Public functions

void Clear()
Clears the path.
auto GetPointCount() const -> std::int32_t
Returns the number of points of all segments.
auto GetDeathCount() const -> std::int32_t
Returns how many times the player died.
auto HasExited() const -> bool
Returns true if the level was left by its exit.
void Record(Vector2f pos, float speed, float timeMult)
Adds where a player is now, called every frame.
void BreakSegment(Break reason)
Ends the segment being recorded.

Public variables

SmallVector<Segment, 0> Segments
Segments of the path, the last one is being recorded.
float Duration
How long the level was played, in frames at 60 FPS.

Enum documentation

enum class Jazz2::Editor::PlayPath::Break : std::uint8_t

What ended a segment of the path.

Enumerators
None

The segment goes on

Died

The player died

Warped

The player was moved far away at once

Exited

The level was left