C# Класс EtherDuels.Config.Configuration

Наследование: ConfigurationRetriever, ISerializable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Configuration() публичный Метод

Constructor which initializes the KeyboardConfiguration Array. Currently, fixed sized of 10 players.
public Configuration ( ) : System
Результат System

Configuration() публичный Метод

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.
Результат System

Equals() публичный Метод

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
Результат bool

GetKeyboardConfiguration() публичный Метод

Returns the KeyboardConfiguration of the specified player.
public GetKeyboardConfiguration ( int playerID ) : KeyboardConfiguration
playerID int The ID which specifies the player.
Результат KeyboardConfiguration

GetObjectData() публичный Метод

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.
Результат void

Save() публичный Метод

Saves the current Configuration to a file.
public Save ( ) : void
Результат void

SetBackwardKey() публичный Метод

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.
Результат void

SetFireKey() публичный Метод

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.
Результат void

SetForwardKey() публичный Метод

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.
Результат void

SetKeyboardConfiguration() публичный Метод

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.
Результат void

SetLeftKey() публичный Метод

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.
Результат void

SetNextWeaponKey() публичный Метод

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.
Результат void

SetPrevWeaponKey() публичный Метод

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.
Результат void

SetRightKey() публичный Метод

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.
Результат void