public override void OnEnter() { if (Fsm == null) { return; } GameObject go = Fsm.GetOwnerDefaultTarget(sequenceToPlay); if (!go) { return; } USSequencer sequence = go.GetComponent <USSequencer>(); if (!go) { return; } if (startFromBeginning.Value) { sequence.Stop(); } sequence.PlaybackFinished += OnSequenceFinished; sequence.Play(); Fsm.Event(startedPlayback); }
public override void OnEnter() { if (Fsm == null) { return; } GameObject go = Fsm.GetOwnerDefaultTarget(sequenceToPlay); if (!go) { return; } USSequencer sequence = go.GetComponent <USSequencer>(); if (!go) { return; } sequence.Stop(); Finish(); }
public override void FireEvent() { if (!sequence) { Debug.LogWarning("No sequence for USstopSequenceEvent : " + name, this); } if (sequence) { sequence.Stop(); } }