Struct rusty_sword_arena::game::GameSetting [−][src]
pub struct GameSetting { pub version: String, pub max_players: u8, pub acceleration: f32, pub max_velocity: f32, pub drag: f32, pub move_threshold: f32, pub respawn_delay: u64, pub drop_delay: u64, }
Server returns a GameSetting in response to receiving a PlayerSync Game settings and player names and colors (including your own) are all in there. You will need to re-parse this every time someone joins or leaves the game.
Fields
version: String
Version number of the server you are connecting to. Compare to rusty_sword_arena::version
max_players: u8
The maximum amount of players this server will allow
acceleration: f32
How quickly a player can get moving (magnitude in OpenGL units per second^2)
max_velocity: f32
Maximum velocity of a player (magnitude in OpenGL units per second)
drag: f32
How much drag there is on movement when the player is not trying to move (how quick you stop)
move_threshold: f32
Move threshold. Magnitude of Vector2 below which a move_speed will be considered 0.
respawn_delay: u64
Milliseconds. How long the server will wait to respawn a player who dies.
drop_delay: u64
Milliseconds. How long the server will allow not receiving input before dropping a player.
Methods
impl GameSetting
[src]
impl GameSetting
Trait Implementations
impl Clone for GameSetting
[src]
impl Clone for GameSetting
fn clone(&self) -> GameSetting
[src]
fn clone(&self) -> GameSetting
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for GameSetting
[src]
impl Debug for GameSetting
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for GameSetting
[src]
impl PartialEq for GameSetting
fn eq(&self, other: &GameSetting) -> bool
[src]
fn eq(&self, other: &GameSetting) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &GameSetting) -> bool
[src]
fn ne(&self, other: &GameSetting) -> bool
This method tests for !=
.
impl Hash for GameSetting
[src]
impl Hash for GameSetting
Auto Trait Implementations
impl Send for GameSetting
impl Send for GameSetting
impl Sync for GameSetting
impl Sync for GameSetting