Esempio n. 1
0
        internal override bool Update(ActionSequence actionSequence, float deltaTime)
        {
            actionSequence.UpdateTimeAxis(deltaTime);
            if (null != action)
            {
                try
                {
                    action();
                }
                catch (Exception e)
                {
                    Debug.LogException(e);
                    actionSequence.Stop();
                }
            }
            else if (null != actionLoop)
            {
                try
                {
                    actionLoop(actionSequence.cycles);
                }
                catch (Exception e)
                {
                    Debug.LogException(e);
                    actionSequence.Stop();
                }
            }

            return(true);
        }
        internal override bool Update(ActionSequence actionSequence, float deltaTime)
        {
            actionSequence.UpdateTimeAxis(deltaTime);
            Behaviour behaviour = actionSequence.id as Behaviour;

            if (behaviour)
            {
                bool final = isToggle ? !behaviour.enabled : isEnable;
                behaviour.enabled = final;
            }

            return(true);
        }