Exemplo n.º 1
0
        protected bool checkExistingState(string s)
        {
            LessGenericList gl = matchExistingState(s);

            if (gl != null)
            {
                return(gl.callActive);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        protected bool finishExistingState(string s)
        {
            LessGenericList gl = matchExistingState(s);

            if (gl != null)
            {
                gl.callActive = false;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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);
        }