/** * Start running another Fungus Script by executing a specific child sequence. * The sequence must be in an idle state to be executed. * Returns true if the Sequence started execution. */ public virtual bool ExecuteSequence(Sequence sequence) { // Sequence must be a component of the Fungus Script game object if (sequence == null || sequence.gameObject != gameObject) { return(false); } // Can't restart a running sequence, have to wait until it's idle again if (sequence.IsExecuting()) { return(false); } // Execute the first command in the command list sequence.ExecuteCommand(0); return(true); }