C# 클래스 Sharplike.Core.ControlFlow.StateMachine

파일 보기 프로젝트 열기: eropple/sharplike 1 사용 예제들

공개 메소드들

메소드 설명
CreateStack ( String stackName, AbstractState rootState ) : void

Creates a new stack within the StateMachine.

DestroyStack ( String stackName ) : void

Destroys any non-main, currently inactive stack.

GameLoopTick ( Sharplike loop ) : System.Boolean
PopState ( ) : AbstractState

Pops a state off of the currently active stack. Control flow will return to the next most recent state in the stack, or will terminate execution of the game the last state in the main stack is popped.

PopState ( String stackName ) : AbstractState

Pops a state off of any specified stack. Execution of the game will terminate if the last state is popped from the main stack, and an exception will be thrown if the last state in any other stack is popped.

PushState ( AbstractState newState ) : void

Pushes a state onto the currently active stack (making it the new running state).

PushState ( String stackName, AbstractState newState ) : void

Pushes a state onto the specified stack.

StateMachine ( AbstractState rootState ) : System

Constructor.

SwitchStack ( String stackName ) : void

Switches execution of the state machine to the specified stack.

비공개 메소드들

메소드 설명
GameProcessing ( object sender, EventArgs e ) : void
InputSystem_CommandEnded ( object sender, Input e ) : void
InputSystem_CommandStarted ( object sender, Input e ) : void
InputSystem_CommandTriggered ( object sender, Input e ) : void

메소드 상세

CreateStack() 공개 메소드

Creates a new stack within the StateMachine.
public CreateStack ( String stackName, AbstractState rootState ) : void
stackName String The string key for the new stack.
rootState AbstractState The start state for the new stack.
리턴 void

DestroyStack() 공개 메소드

Destroys any non-main, currently inactive stack.
public DestroyStack ( String stackName ) : void
stackName String The string key of the stack to destroy.
리턴 void

GameLoopTick() 공개 메소드

public GameLoopTick ( Sharplike loop ) : System.Boolean
loop Sharplike
리턴 System.Boolean

PopState() 공개 메소드

Pops a state off of the currently active stack. Control flow will return to the next most recent state in the stack, or will terminate execution of the game the last state in the main stack is popped.
public PopState ( ) : AbstractState
리턴 AbstractState

PopState() 공개 메소드

Pops a state off of any specified stack. Execution of the game will terminate if the last state is popped from the main stack, and an exception will be thrown if the last state in any other stack is popped.
public PopState ( String stackName ) : AbstractState
stackName String The stack from which to pop a state.
리턴 AbstractState

PushState() 공개 메소드

Pushes a state onto the currently active stack (making it the new running state).
public PushState ( AbstractState newState ) : void
newState AbstractState The state to add to the currently active stack.
리턴 void

PushState() 공개 메소드

Pushes a state onto the specified stack.
public PushState ( String stackName, AbstractState newState ) : void
stackName String The stack on which to place the state.
newState AbstractState The state to add to the specified stack.
리턴 void

StateMachine() 공개 메소드

Constructor.
public StateMachine ( AbstractState rootState ) : System
rootState AbstractState The root state to start the StateMachine on.
리턴 System

SwitchStack() 공개 메소드

Switches execution of the state machine to the specified stack.
public SwitchStack ( String stackName ) : void
stackName String The string key of the stack to which the state machine shall switch execution.
리턴 void