C# Class EtherDuels.Config.Configuration

Inheritance: ConfigurationRetriever, ISerializable
Afficher le fichier Open project: julius/pse_spacewar Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

Configuration() public méthode

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.
Résultat System

Equals() public méthode

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
Résultat bool

GetKeyboardConfiguration() public méthode

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

GetObjectData() public méthode

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.
Résultat void

Save() public méthode

Saves the current Configuration to a file.
public Save ( ) : void
Résultat void

SetBackwardKey() public méthode

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.
Résultat void

SetFireKey() public méthode

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.
Résultat void

SetForwardKey() public méthode

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.
Résultat void

SetKeyboardConfiguration() public méthode

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.
Résultat void

SetLeftKey() public méthode

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.
Résultat void

SetNextWeaponKey() public méthode

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.
Résultat void

SetPrevWeaponKey() public méthode

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.
Résultat void

SetRightKey() public méthode

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.
Résultat void