C# Class Fungus.Block

Inheritance: Fungus.Node
ファイルを表示 Open project: snozbot/fungus Class Usage Examples

Protected Properties

Property Type Description
activeCommand Fungus.Command
executionCount int
executionInfoSet bool
executionState ExecutionState
jumpToCommandIndex int
previousActiveCommandIndex int

Public Methods

Method Description
Execute ( int commandIndex, System.Action onComplete = null ) : IEnumerator

A coroutine method that executes all commands in the Block. Only one running instance of each Block is permitted.

GetConnectedBlocks ( ) : List

Returns a list of all Blocks connected to this one.

GetExecutionCount ( ) : int

Returns the number of times this Block has executed.

GetFlowchart ( ) : Flowchart

Returns the parent Flowchart for this Block.

GetLabelIndex ( string labelKey ) : int

Returns the index of the Label command with matching key, or -1 if not found.

GetPreviousActiveCommandType ( ) : Type

Returns the type of the previously executing command.

IsExecuting ( ) : bool

Returns true if the Block is executing a command.

StartExecution ( ) : void

Start a coroutine which executes all commands in the Block. Only one running instance of each Block is permitted.

Stop ( ) : void

Stop executing commands in this Block.

UpdateIndentLevels ( ) : void

Recalculate the indent levels for all commands in the list.

Protected Methods

Method Description
Awake ( ) : void
SetExecutionInfo ( ) : void

Populate the command metadata used to control execution.

Update ( ) : void

Method Details

Awake() protected method

protected Awake ( ) : void
return void

Execute() public method

A coroutine method that executes all commands in the Block. Only one running instance of each Block is permitted.
public Execute ( int commandIndex, System.Action onComplete = null ) : IEnumerator
commandIndex int Index of command to start execution at
onComplete System.Action Delegate function to call when execution completes
return IEnumerator

GetConnectedBlocks() public method

Returns a list of all Blocks connected to this one.
public GetConnectedBlocks ( ) : List
return List

GetExecutionCount() public method

Returns the number of times this Block has executed.
public GetExecutionCount ( ) : int
return int

GetFlowchart() public method

Returns the parent Flowchart for this Block.
public GetFlowchart ( ) : Flowchart
return Flowchart

GetLabelIndex() public method

Returns the index of the Label command with matching key, or -1 if not found.
public GetLabelIndex ( string labelKey ) : int
labelKey string
return int

GetPreviousActiveCommandType() public method

Returns the type of the previously executing command.
public GetPreviousActiveCommandType ( ) : Type
return System.Type

IsExecuting() public method

Returns true if the Block is executing a command.
public IsExecuting ( ) : bool
return bool

SetExecutionInfo() protected method

Populate the command metadata used to control execution.
protected SetExecutionInfo ( ) : void
return void

StartExecution() public method

Start a coroutine which executes all commands in the Block. Only one running instance of each Block is permitted.
public StartExecution ( ) : void
return void

Stop() public method

Stop executing commands in this Block.
public Stop ( ) : void
return void

Update() protected method

protected Update ( ) : void
return void

UpdateIndentLevels() public method

Recalculate the indent levels for all commands in the list.
public UpdateIndentLevels ( ) : void
return void

Property Details

activeCommand protected_oe property

protected Command,Fungus activeCommand
return Fungus.Command

executionCount protected_oe property

protected int executionCount
return int

executionInfoSet protected_oe property

protected bool executionInfoSet
return bool

executionState protected_oe property

protected ExecutionState executionState
return ExecutionState

jumpToCommandIndex protected_oe property

protected int jumpToCommandIndex
return int

previousActiveCommandIndex protected_oe property

Index of last command executed before the current one. -1 indicates no previous command.
protected int previousActiveCommandIndex
return int