public ActorCast(Serializable.Skill skill, ActorPropertyAbility actor, Remoting.Value<CastResult> return_value) { _Actor = actor; this._Skill = skill; this._ReturnValue = return_value; _Done = false; _Machine = new Utility.StageMachine(); _Step = CastStep.NotYet; }
void Framework.ILaunched.Shutdown() { _Step = CastStep.NotYet; _Machine.Termination(); }
private void _ToEffective(float effective) { _Step = CastStep.Effective; var stage = new Effective(effective, _Actor, _Prototype.CaptureBounds); stage.DoneEvent += () => { _ReturnValue.SetValue(CastResult.Miss); _ToEnd(_Prototype.End); }; _Machine.Push(stage); }
private void _ToEnd(float end) { _Step = CastStep.Ending; var stage = new After(end); stage.DoneEvent += _OnDone; _Machine.Push(stage); }
private void _ToBegin(float begin) { _Step = CastStep.Beginning; var stage = new After(begin); stage.DoneEvent += () => { _ToEffective(_Prototype.Effective); }; _Machine.Push(stage); }