C# Class RemoteTech.FlightComputer.Commands.ExternalAPICommand

Inheritance: AbstractCommand
Afficher le fichier Open project: RemoteTechnologiesGroup/RemoteTech Class Usage Examples

Méthodes publiques

Méthode Description
Abort ( ) : void

Aborts the active external command and invokes the ReflectionAbortMethod on the ReflectionType.

Execute ( FlightComputer computer, FlightCtrlState ctrlState ) : bool

Executes this command and invokes the ReflectionExecuteMethod on the ReflectionType. When this command is aborted the fallback commnd is "KillRot".

FromExternal ( ConfigNode externalData ) : ExternalAPICommand

Configures an ExternalAPICommand.

Load ( ConfigNode node, FlightComputer computer ) : bool

Loads the ExternalAPICommand from the persistent file. If the loading can't find the ReflectionType we'll notify a ScreenMessage and remove the command.

Pop ( FlightComputer computer ) : bool

Pops the command and invokes the ReflectionPopMethod on the ReflectionType.

Save ( ConfigNode node, FlightComputer computer ) : void

Saves the original configNode externalData passed from the api to the persistent

Private Methods

Méthode Description
ConfigNodeToObject ( ExternalAPICommand command, ConfigNode data ) : void

Maps the ConfigNode object passed from the api or loading to an ExternalAPICommand.

callReflectionMember ( string reflectionMember ) : object

Calls the rflection method.

getReflectionType ( string reflectionType ) : Type

Trys to load the reflectionType. Throws an exception if we can't find the type.

prepareDataForExternalMod ( ) : ConfigNode

Prepare the data to pass back to the mod.

Method Details

Abort() public méthode

Aborts the active external command and invokes the ReflectionAbortMethod on the ReflectionType.
public Abort ( ) : void
Résultat void

Execute() public méthode

Executes this command and invokes the ReflectionExecuteMethod on the ReflectionType. When this command is aborted the fallback commnd is "KillRot".
public Execute ( FlightComputer computer, FlightCtrlState ctrlState ) : bool
computer FlightComputer Current flightcomputer
ctrlState FlightCtrlState Current FlightCtrlState
Résultat bool

FromExternal() public static méthode

Configures an ExternalAPICommand.
public static FromExternal ( ConfigNode externalData ) : ExternalAPICommand
externalData System.ConfigNode Data passed by the Api.QueueCommandToFlightComputer
Résultat ExternalAPICommand

Load() public méthode

Loads the ExternalAPICommand from the persistent file. If the loading can't find the ReflectionType we'll notify a ScreenMessage and remove the command.
public Load ( ConfigNode node, FlightComputer computer ) : bool
node System.ConfigNode Node with the command infos to load
computer FlightComputer Current flightcomputer
Résultat bool

Pop() public méthode

Pops the command and invokes the ReflectionPopMethod on the ReflectionType.
public Pop ( FlightComputer computer ) : bool
computer FlightComputer Current flightcomputer
Résultat bool

Save() public méthode

Saves the original configNode externalData passed from the api to the persistent
public Save ( ConfigNode node, FlightComputer computer ) : void
node System.ConfigNode Node with the command infos to save in
computer FlightComputer Current flightcomputer
Résultat void