/** * The Event Handler should call this method when the event is detected. */ public virtual bool ExecuteSequence() { if (parentSequence == null) { return(false); } FungusScript fungusScript = parentSequence.GetFungusScript(); return(fungusScript.ExecuteSequence(parentSequence)); }
public virtual void ExecuteSequence(Sequence s) { OnExit(); Sequence sequence = GetSequence(); if (sequence != null) { sequence.Stop(); FungusScript fungusScript = sequence.GetFungusScript(); if (fungusScript != null) { fungusScript.ExecuteSequence(s); } } }
public override void OnEnter() { if (targetFungusScript != null) { if (stopCurrentScript) { Stop(); } targetFungusScript.ExecuteSequence(targetSequenceName); if (!stopCurrentScript) { Continue(); } } else { Continue(); } }
public virtual void ExecuteSequence(Sequence s) { OnExit(); if (parentSequence != null) { FungusScript fungusScript = parentSequence.GetFungusScript(); // Record the currently selected sequence because Stop() will clear it. Sequence selectedSequence = fungusScript.selectedSequence; parentSequence.Stop(); if (fungusScript != null) { // If the executing sequence is currently selected then follow the execution // onto the next sequence in the inspector. if (selectedSequence == parentSequence) { fungusScript.selectedSequence = s; } fungusScript.ExecuteSequence(s); } } }