Example #1
0
        /// <summary>
        /// Creates and initializes the action with a duration, a "from" percentage and a "to" percentage
        /// </summary>
        public static CCProgressFromTo actionWithDuration(float duration, float fFromPercentage, float fToPercentage)
        {
            CCProgressFromTo pProgressFromTo = new CCProgressFromTo();

            pProgressFromTo.initWithDuration(duration, fFromPercentage, fToPercentage);

            return(pProgressFromTo);
        }
Example #2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone           pNewZone = null;
            CCProgressFromTo pCopy    = null;

            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCProgressFromTo)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCProgressFromTo();
                pZone = pNewZone = new CCZone(pCopy);
            }

            // CCActionInterval::copyWithZone(pZone);
            copyWithZone(pZone);
            pCopy.initWithDuration(m_fDuration, m_fFrom, m_fTo);

            // CC_SAFE_DELETE(pNewZone);
            return(pCopy);
        }
Example #3
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCProgressFromTo.actionWithDuration(m_fDuration, m_fTo, m_fFrom));
 }