C# Class EtherDuels.Config.Configuration

Inheritance: ConfigurationRetriever, ISerializable
Show file Open project: julius/pse_spacewar Class Usage Examples

Public Methods

Method Description
Configuration ( ) : System

Constructor which initializes the KeyboardConfiguration Array. Currently, fixed sized of 10 players.

Configuration ( SerializationInfo info, StreamingContext ctxt ) : System

Creates a new Configuration.

Equals ( Configuration secConf ) : bool

Checks if the assigned Configuration object is equal to this one. Objects are defined equal if all the respective settings match with each other.

GetKeyboardConfiguration ( int playerID ) : KeyboardConfiguration

Returns the KeyboardConfiguration of the specified player.

GetObjectData ( SerializationInfo info, StreamingContext ctxt ) : void

Adds all important values to the SerializationInfo.

Save ( ) : void

Saves the current Configuration to a file.

SetBackwardKey ( int playerID, Keys key ) : void

Sets the backward key for the player specified by the playerID.

SetFireKey ( int playerID, Keys key ) : void

Sets the fire key for the player specified by the playerID.

SetForwardKey ( int playerID, Keys key ) : void

Sets the forward key for the player specified by the playerID.

SetKeyboardConfiguration ( int playerID, KeyboardConfiguration keyConfiguration ) : void

Sets the KeyboardConfiguration for the specified player.

SetLeftKey ( int playerID, Keys key ) : void

Sets the turn-left key for the player specified by the playerID.

SetNextWeaponKey ( int playerID, Keys key ) : void

Sets the next-weapon key for the player specified by the playerID.

SetPrevWeaponKey ( int playerID, Keys key ) : void

Sets the prev-weapon key for the player specified by the playerID.

SetRightKey ( int playerID, Keys key ) : void

Sets the turn-right key for the player specified by the playerID.

Method Details

Configuration() public method

Constructor which initializes the KeyboardConfiguration Array. Currently, fixed sized of 10 players.
public Configuration ( ) : System
return System

Configuration() public method

Creates a new Configuration.
public Configuration ( SerializationInfo info, StreamingContext ctxt ) : System
info System.Runtime.Serialization.SerializationInfo Info on how to serialize this class.
ctxt System.Runtime.Serialization.StreamingContext The assigned StreamingContext.
return System

Equals() public method

Checks if the assigned Configuration object is equal to this one. Objects are defined equal if all the respective settings match with each other.
public Equals ( Configuration secConf ) : bool
secConf Configuration
return bool

GetKeyboardConfiguration() public method

Returns the KeyboardConfiguration of the specified player.
public GetKeyboardConfiguration ( int playerID ) : KeyboardConfiguration
playerID int The ID which specifies the player.
return KeyboardConfiguration

GetObjectData() public method

Adds all important values to the SerializationInfo.
public GetObjectData ( SerializationInfo info, StreamingContext ctxt ) : void
info System.Runtime.Serialization.SerializationInfo The assigned SerializationInfo.
ctxt System.Runtime.Serialization.StreamingContext The assigned StreamingContext.
return void

Save() public method

Saves the current Configuration to a file.
public Save ( ) : void
return void

SetBackwardKey() public method

Sets the backward key for the player specified by the playerID.
public SetBackwardKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetFireKey() public method

Sets the fire key for the player specified by the playerID.
public SetFireKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetForwardKey() public method

Sets the forward key for the player specified by the playerID.
public SetForwardKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetKeyboardConfiguration() public method

Sets the KeyboardConfiguration for the specified player.
public SetKeyboardConfiguration ( int playerID, KeyboardConfiguration keyConfiguration ) : void
playerID int The ID which specifies the player.
keyConfiguration KeyboardConfiguration The KeyboardConfiguration of the specified player.
return void

SetLeftKey() public method

Sets the turn-left key for the player specified by the playerID.
public SetLeftKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetNextWeaponKey() public method

Sets the next-weapon key for the player specified by the playerID.
public SetNextWeaponKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetPrevWeaponKey() public method

Sets the prev-weapon key for the player specified by the playerID.
public SetPrevWeaponKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void

SetRightKey() public method

Sets the turn-right key for the player specified by the playerID.
public SetRightKey ( int playerID, Keys key ) : void
playerID int The ID which specifies the player.
key Keys The new key which needs to be assigned.
return void