public void Tick() { if(!SecuenceFinished){ if(currentInterpreter == null){ currentInterpreter = SecuenceInterpreterFactory.Intance.createSecuenceInterpreterFor(currentNode); currentInterpreter.UseNode(currentNode); } currentInterpreter.Tick(); if(currentInterpreter.HasFinishedInterpretation()){ Debug.Log ("Finished interpretation"); currentNode = currentInterpreter.NextNode(); if(currentInterpreter is Object) Object.DestroyImmediate(currentInterpreter as Object); currentInterpreter = null; } } }
public void Tick() { if (!SecuenceFinished) { if (currentInterpreter == null) { currentInterpreter = SecuenceInterpreterFactory.Intance.createSecuenceInterpreterFor(currentNode); currentInterpreter.UseNode(currentNode); } currentInterpreter.Tick(); if (currentInterpreter.HasFinishedInterpretation()) { Debug.Log("Finished interpretation"); currentNode = currentInterpreter.NextNode(); if (currentInterpreter is Object) { Object.DestroyImmediate(currentInterpreter as Object); } currentInterpreter = null; } } }