Exemplo n.º 1
0
        public bool initOneTwo(CCFiniteTimeAction action1, CCFiniteTimeAction action2)
        {
            Debug.Assert(action1 != null);
            Debug.Assert(action2 != null);

            bool bRet = false;

            float d1 = action1.duration;
            float d2 = action2.duration;

            if (base.initWithDuration(Math.Max(d1, d2)))
            {
                m_pOne = action1;
                m_pTwo = action2;

                if (d1 > d2)
                {
                    m_pTwo = CCSequence.actionOneTwo(action2, CCDelayTime.actionWithDuration(d1 - d2));
                }
                else if (d1 < d2)
                {
                    m_pOne = CCSequence.actionOneTwo(action1, CCDelayTime.actionWithDuration(d2 - d1));
                }

                bRet = true;
            }

            return(bRet);
        }
Exemplo n.º 2
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCSequence.actionOneTwo(m_pActions[1].reverse(), m_pActions[0].reverse()));
 }