protected bool checkExistingState(string s) { LessGenericList gl = matchExistingState(s); if (gl != null) { return(gl.callActive); } else { return(false); } }
protected bool finishExistingState(string s) { LessGenericList gl = matchExistingState(s); if (gl != null) { gl.callActive = false; return(true); } else { return(false); } }
protected bool stopExistingState(string s) { LessGenericList gl = matchExistingState(s); if (gl != null) { if (gl.callActive == true) { StopCoroutine(s); gl.callActive = false; return(true); } } return(false); }
public void Start() { #if SHOW_DEBUG_MESSAGES if (debug) { Debug.Log(gameObject.name + " is initializing."); } #endif findEventManager(); activeStates = new List <LessGenericList>(); for (int i = 0; i < stateNames.Length; i++) { LessGenericList lgl = new LessGenericList(stateNames[i]); activeStates.Add(lgl); } Coinflip(); }
protected bool startExistingState(string s) { #if SHOW_DEBUG_MESSAGES if (!debug) { Debug.Log("Changing state to " + s); } #endif LessGenericList gl = matchExistingState(s); if (gl != null) { if (gl.callActive == false) { gl.callActive = true; StartCoroutine(s); return(true); } } return(false); }