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

An entity appears, with its kind, position and velocity. More...

#include </__w/project-rtype/project-rtype/protocol/include/rtype/events.hpp>

Public Member Functions

bool operator== (const SpawnEvent &) const =default
 Field-by-field equality.
 

Public Attributes

std::uint32_t tick = 0
 Server tick at which it appeared.
 
std::uint32_t id = 0
 Network id.
 
std::uint8_t kind = 0
 Kind, an EntityKind value.
 
float x = 0.0F
 Position of its center, in logical pixels.
 
float y = 0.0F
 Position of its center, in logical pixels.
 
float vx = 0.0F
 Velocity, in logical pixels per second.
 
float vy = 0.0F
 Velocity, in logical pixels per second.
 
std::uint8_t owner = no_player
 Player it belongs to (a ship's player, a missile's shooter), or no_player.
 

Detailed Description

An entity appears, with its kind, position and velocity.

Member Function Documentation

◆ operator==()

bool rtype::SpawnEvent::operator== ( const SpawnEvent &  ) const
default

Field-by-field equality.

Returns
true if every field is equal.

Member Data Documentation

◆ id

std::uint32_t rtype::SpawnEvent::id = 0

Network id.

◆ kind

std::uint8_t rtype::SpawnEvent::kind = 0

Kind, an EntityKind value.

◆ owner

std::uint8_t rtype::SpawnEvent::owner = no_player

Player it belongs to (a ship's player, a missile's shooter), or no_player.

◆ tick

std::uint32_t rtype::SpawnEvent::tick = 0

Server tick at which it appeared.

◆ vx

float rtype::SpawnEvent::vx = 0.0F

Velocity, in logical pixels per second.

◆ vy

float rtype::SpawnEvent::vy = 0.0F

Velocity, in logical pixels per second.

◆ x

float rtype::SpawnEvent::x = 0.0F

Position of its center, in logical pixels.

◆ y

float rtype::SpawnEvent::y = 0.0F

Position of its center, in logical pixels.


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