public PhaseJSM(List <StateMachine> states, [NonExplicitParameter] PhaseProperties props, float timeout, int from) #if UNITY_EDITOR : base(from == 0 ? states : states.Skip(from).Prepend(states[0]).ToList(), props, timeout) { if (this.states.Try(from == 0 ? 0 : 1) is PhaseParallelActionSM psm) { psm.wait = 0f; }
public DialoguePhaseSM([NonExplicitParameter] PhaseProperties props, string file) : base(new List <StateMachine>() { new PhaseSequentialActionSM(new List <StateMachine>() { new ReflectableLASM(SMReflection.Dialogue(file)), new ReflectableLASM(SMReflection.ShiftPhase()) }, 0f) }, props, 0) { }
public PhaseCompletion(PhaseProperties props, PhaseClearMethod clear, BehaviorEntity exec, CampaignSnapshot snap, float timeout) { this.props = props; this.clear = clear; this.exec = exec; this.timeout = timeout; this.hits = GameManagement.Instance.HitsTaken - snap.hitsTaken; this.noMeter = GameManagement.Instance.MeterFrames == snap.meterFrames; this.elapsedFrames = ETime.FrameNumber - snap.frame; }
/// <summary> /// </summary> /// <param name="states">Substates, run sequentially</param> /// <param name="timeout">Timeout in seconds before the phase automatically ends. Set to zero for no timeout</param> /// <param name="props">Properties describing miscellaneous features of this phase</param> public PhaseSM(List <StateMachine> states, [NonExplicitParameter] PhaseProperties props, float timeout) : base(states) { this._timeout = timeout; this.props = props; for (int ii = 0; ii < states.Count; ++ii) { if (states[ii] is EndPSM) { endPhase = states[ii] as EndPSM; states.RemoveAt(ii); break; } } for (int ii = 0; ii < states.Count; ++ii) { if (states[ii] is FinishPSM) { finishPhase = states[ii] as FinishPSM; states.RemoveAt(ii); break; } } }