C# Class Sharplike.Core.ControlFlow.AbstractState

Exibir arquivo Open project: eropple/sharplike Class Usage Examples

Public Methods

Method Description
AbstractState ( ) : System

Constructor.

Protected Methods

Method Description
CommandEnded ( InputSystem e ) : void

Invoked when the InputSystem detects a CommandEnded event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.

CommandStarted ( InputSystem e ) : void

Invoked when the InputSystem detects a CommandStarted event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.

CommandTriggered ( InputSystem e ) : void

Invoked when the InputSystem detects a CommandTriggered event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.

GameLoopTick ( AbstractGameLoop loop ) : void

The logic tick at the core of the StepwiseGameLoop or RealtimeGameLoop. Primary game logic is done in this function.

GameProcessing ( ) : void

A state-based wrapper for Game.GameProcessing. GameProcessing is called just before a frame is rendered to the screen. It may be used for graphical map effects, but should not contain game logic.

StackGotFocus ( ) : void

Invoked after control is switched back to this state's stack, but before this state's GameLoopTick is called.

StackLostFocus ( ) : void

Invoked after (or during) the last GameLoopTick of this state, before control is switched over to a different stack.

StateEnded ( ) : void

Invoked after (or during) the last GameLoopTick of this state, during the process of popping it off the StateMachine's stack.

StatePaused ( ) : void

Invoked after another state has been added to the stack on top of this state, but before the other state's StateStarted function is called.

StateResumed ( AbstractState previousState ) : void

Invoked after a state is popped from the stack, after that state's StateEnded but before this state's next GameLoopTick.

StateStarted ( ) : void

Invoked when the state is first started (added to the stack), but before any instances of GameLoopTick are called.

Method Details

AbstractState() public method

Constructor.
public AbstractState ( ) : System
return System

CommandEnded() protected method

Invoked when the InputSystem detects a CommandEnded event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.
protected CommandEnded ( InputSystem e ) : void
e Sharplike.Core.Input.InputSystem The command event details for the CommandEnded event.
return void

CommandStarted() protected method

Invoked when the InputSystem detects a CommandStarted event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.
protected CommandStarted ( InputSystem e ) : void
e Sharplike.Core.Input.InputSystem The command event details for the CommandStarted event.
return void

CommandTriggered() protected method

Invoked when the InputSystem detects a CommandTriggered event. This should NOT be used for games that use the StepwiseGameLoop; it is intended strictly for games using the RealtimeGameLoop.
protected CommandTriggered ( InputSystem e ) : void
e Sharplike.Core.Input.InputSystem The command event details for the CommandTriggered event.
return void

GameLoopTick() protected method

The logic tick at the core of the StepwiseGameLoop or RealtimeGameLoop. Primary game logic is done in this function.
protected GameLoopTick ( AbstractGameLoop loop ) : void
loop Sharplike.Core.Runtime.AbstractGameLoop
return void

GameProcessing() protected method

A state-based wrapper for Game.GameProcessing. GameProcessing is called just before a frame is rendered to the screen. It may be used for graphical map effects, but should not contain game logic.
protected GameProcessing ( ) : void
return void

StackGotFocus() protected method

Invoked after control is switched back to this state's stack, but before this state's GameLoopTick is called.
protected StackGotFocus ( ) : void
return void

StackLostFocus() protected method

Invoked after (or during) the last GameLoopTick of this state, before control is switched over to a different stack.
protected StackLostFocus ( ) : void
return void

StateEnded() protected method

Invoked after (or during) the last GameLoopTick of this state, during the process of popping it off the StateMachine's stack.
protected StateEnded ( ) : void
return void

StatePaused() protected method

Invoked after another state has been added to the stack on top of this state, but before the other state's StateStarted function is called.
protected StatePaused ( ) : void
return void

StateResumed() protected method

Invoked after a state is popped from the stack, after that state's StateEnded but before this state's next GameLoopTick.
protected StateResumed ( AbstractState previousState ) : void
previousState AbstractState /// The state most recently popped from the state machine. Can be used with /// inherited states to access data (i.e., a dialog box's stateful contents). ///
return void

StateStarted() protected method

Invoked when the state is first started (added to the stack), but before any instances of GameLoopTick are called.
protected StateStarted ( ) : void
return void