C# Класс Indiefreaks.Xna.Logic.Command

The Command class encapsulates methods that will be executed by the current session when necessary A Command instance contains a clientExecution delegate that is executed on the player machine when set to Local and LocalAndServer. The serverExecution gets called on the session host when set to Server. Finally, the ApplyServerResult is called back on all players when the ServerExecution delegate returns. Each Command is identified by its Id that is automatically generated by the Session so that Remote Command calls are always consistent.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Command ( System.Condition condition, ClientCommand clientExecution, ServerCommand serverExecution, ApplyServerCommand applyServerResult, CommandType comandType, Type networkValueType, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : System

Creates a new Command instance

CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateLocalCommand ( ClientCommand clientCommand ) : Command
CreateLocalCommand ( ClientCommand clientCommand, ExecutionFrequency frequency ) : Command
CreateLocalCommand ( System.Condition condition, ClientCommand clientCommand ) : Command
CreateLocalCommand ( System.Condition condition, ClientCommand clientCommand, ExecutionFrequency frequency ) : Command
CreateServerCommand ( System.Condition condition, ServerCommand serverCommand ) : Command
CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ExecutionFrequency frequency ) : Command
CreateServerCommand ( ServerCommand serverCommand ) : Command
CreateServerCommand ( ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
CreateServerCommand ( ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
CreateServerCommand ( ServerCommand serverCommand, ExecutionFrequency frequency ) : Command
Dispose ( ) : void

Exécute les tâches définies par l'application associées à la libération ou à la redéfinition des ressources non managées.

Приватные методы

Метод Описание
Dispose ( bool disposing ) : void
Process ( float elapsed ) : void
UpdateTick ( float elapsed ) : void

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

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

Creates a new Command instance
public Command ( System.Condition condition, ClientCommand clientExecution, ServerCommand serverExecution, ApplyServerCommand applyServerResult, CommandType comandType, Type networkValueType, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : System
condition System.Condition
clientExecution ClientCommand The method that will be executed
serverExecution ServerCommand
applyServerResult ApplyServerCommand
comandType CommandType The CommandType of this Command
networkValueType System.Type The type of the value that is returned by the Execution delegate, if the command doesn't returns a value, you can set this to null to limit network data transfer
dataTransferOptions DataTransferOptions Defines options for network packet transmission
frequency ExecutionFrequency Defines the frequency at which the current command will be processed
Результат System

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
clientCommand ClientCommand
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
clientCommand ClientCommand
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
clientCommand ClientCommand
serverCommand ServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
clientCommand ClientCommand
serverCommand ServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
condition System.Condition
clientCommand ClientCommand
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
condition System.Condition
clientCommand ClientCommand
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
condition System.Condition
clientCommand ClientCommand
serverCommand ServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateLocalAndServerCommand() публичный статический Метод

public static CreateLocalAndServerCommand ( System.Condition condition, ClientCommand clientCommand, ServerCommand serverCommand, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
condition System.Condition
clientCommand ClientCommand
serverCommand ServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateLocalCommand() публичный статический Метод

public static CreateLocalCommand ( ClientCommand clientCommand ) : Command
clientCommand ClientCommand
Результат Command

CreateLocalCommand() публичный статический Метод

public static CreateLocalCommand ( ClientCommand clientCommand, ExecutionFrequency frequency ) : Command
clientCommand ClientCommand
frequency ExecutionFrequency
Результат Command

CreateLocalCommand() публичный статический Метод

public static CreateLocalCommand ( System.Condition condition, ClientCommand clientCommand ) : Command
condition System.Condition
clientCommand ClientCommand
Результат Command

CreateLocalCommand() публичный статический Метод

public static CreateLocalCommand ( System.Condition condition, ClientCommand clientCommand, ExecutionFrequency frequency ) : Command
condition System.Condition
clientCommand ClientCommand
frequency ExecutionFrequency
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( System.Condition condition, ServerCommand serverCommand ) : Command
condition System.Condition
serverCommand ServerCommand
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
condition System.Condition
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
condition System.Condition
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( System.Condition condition, ServerCommand serverCommand, ExecutionFrequency frequency ) : Command
condition System.Condition
serverCommand ServerCommand
frequency ExecutionFrequency
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( ServerCommand serverCommand ) : Command
serverCommand ServerCommand
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions ) : Command
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( ServerCommand serverCommand, ApplyServerCommand applyServerResult, Type typeOfDataExchanged, DataTransferOptions dataTransferOptions, ExecutionFrequency frequency ) : Command
serverCommand ServerCommand
applyServerResult ApplyServerCommand
typeOfDataExchanged System.Type
dataTransferOptions DataTransferOptions
frequency ExecutionFrequency
Результат Command

CreateServerCommand() публичный статический Метод

public static CreateServerCommand ( ServerCommand serverCommand, ExecutionFrequency frequency ) : Command
serverCommand ServerCommand
frequency ExecutionFrequency
Результат Command

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

Exécute les tâches définies par l'application associées à la libération ou à la redéfinition des ressources non managées.
public Dispose ( ) : void
Результат void