public override void Bind() { base.Bind(); this.DoSomething = new Signal <DoSomethingCommand>(this); this.DoSomethingElse = new Signal <DoSomethingElseCommand>(this); this.CommandReference = new Signal <CommandReferenceCommand>(this); _IsNameFrankProperty = new P <Boolean>(this, "IsNameFrank"); _NameProperty = new P <String>(this, "Name"); _IsAmazingProperty = new P <Boolean>(this, "IsAmazing"); _ComplexProperty = new P <AmazingClass>(this, "Complex"); _ReferenceProperty = new P <SomeTypeReference>(this, "Reference"); _SomeUnityTypeProperty = new P <Vector3>(this, "SomeUnityType"); _TheStateMachineProperty = new SomeStateMachine(this, "TheStateMachine"); ResetIsNameFrank(); TheStateMachineProperty.IsFrank.AddComputer(IsNameFrankProperty); }
protected virtual void OnStateChange(SomeStateMachine stateMachine) { if (stateMachine != this.stateMachine) { return; } switch (this.stateMachine.State) { // When child stops running, let parent now (will propagate) case StateType.Finish: var parent = Parent; if (parent != null) { ((BehaviorNode)parent).stateMachine.State = StateType.Finish; } break; default: break; } }
public override void Bind() { base.Bind(); this.DoSomething = new Signal<DoSomethingCommand>(this); this.DoSomethingElse = new Signal<DoSomethingElseCommand>(this); this.CommandReference = new Signal<CommandReferenceCommand>(this); _IsNameFrankProperty = new P<Boolean>(this, "IsNameFrank"); _NameProperty = new P<String>(this, "Name"); _IsAmazingProperty = new P<Boolean>(this, "IsAmazing"); _ComplexProperty = new P<AmazingClass>(this, "Complex"); _ReferenceProperty = new P<SomeTypeReference>(this, "Reference"); _SomeUnityTypeProperty = new P<Vector3>(this, "SomeUnityType"); _TheStateMachineProperty = new SomeStateMachine(this, "TheStateMachine"); ResetIsNameFrank(); TheStateMachineProperty.IsFrank.AddComputer(IsNameFrankProperty); }