C# Class StorySystem.CommonCommands.CompositeCommand

name(arg1,arg2,...);
这里的Name、ArgNames与InitialCommands为同一command定义的各个调用共享。 由于解析时需要处理交叉引用,先克隆后Load。 这里的自定义命令支持挂起-恢复执行或递归(性能较低,仅处理小规模问题),但 二者不能同时使用。 注意:所有依赖InitialCommands等共享数据的其它成员,初始化需要写成lazy的样式,不要在Clone与Load里初始化,因为 此时共享数据可能还不完整!
Inheritance: AbstractStoryCommand
Mostrar archivo Open project: dreamanlan/CSharpGameFramework Class Usage Examples

Public Methods

Method Description
Clone ( ) : IStoryCommand
InitSharedData ( ) : void
NewCall ( StoryInstance instance, object iterator, object args ) : void

Protected Methods

Method Description
Evaluate ( StoryInstance instance, object iterator, object args ) : void
ExecCommand ( StoryInstance instance, long delta, object iterator, object args ) : bool
Load ( Dsl callData ) : void

Private Methods

Method Description
NewStackElementInfo ( ) : StackElementInfo
PopStack ( StoryInstance instance ) : void
Prepare ( StackElementInfo stackInfo ) : void
PushStack ( StoryInstance instance, StackElementInfo info ) : void

Method Details

Clone() public method

public Clone ( ) : IStoryCommand
return IStoryCommand

Evaluate() protected method

protected Evaluate ( StoryInstance instance, object iterator, object args ) : void
instance StoryInstance
iterator object
args object
return void

ExecCommand() protected method

protected ExecCommand ( StoryInstance instance, long delta, object iterator, object args ) : bool
instance StoryInstance
delta long
iterator object
args object
return bool

InitSharedData() public method

public InitSharedData ( ) : void
return void

Load() protected method

protected Load ( Dsl callData ) : void
callData Dsl
return void

NewCall() public method

public NewCall ( StoryInstance instance, object iterator, object args ) : void
instance StoryInstance
iterator object
args object
return void