Beispiel #1
0
        public override CCObject copyWithZone(CCZone zone)
        {
            CCZone          tmpZone = zone;
            CCRepeatForever ret     = null;

            if (tmpZone != null && tmpZone.m_pCopyObject != null)
            {
                ret = tmpZone.m_pCopyObject as CCRepeatForever;
                if (ret == null)
                {
                    return(null);
                }
            }
            else
            {
                ret     = new CCRepeatForever();
                tmpZone = new CCZone(ret);
            }

            base.copyWithZone(tmpZone);

            CCActionInterval param = m_pInnerAction.copy() as CCActionInterval;

            if (param == null)
            {
                return(null);
            }
            ret.initWithAction(param);

            return(ret);
        }
Beispiel #2
0
        public bool initWithAction(CCActionInterval action)
        {
            Debug.Assert(action != null);

            m_pInnerAction = action;
            return(true);
        }
Beispiel #3
0
        public static CCActionInterval actionWithDuration(float d)
        {
            CCActionInterval ret = new CCActionInterval();

            ret.initWithDuration(d);

            return(ret);
        }
Beispiel #4
0
        public static CCRepeatForever actionWithAction(CCActionInterval action)
        {
            CCRepeatForever ret = new CCRepeatForever();

            ret.initWithAction(action);

            return(ret);
        }
Beispiel #5
0
 /// <summary>
 /// initializes the action
 /// </summary>
 /// <param name="pAction"></param>
 /// <returns></returns>
 public bool initWithAction(CCActionInterval pAction)
 {
     if (base.initWithDuration(pAction.duration))
     {
         m_pOther = pAction;
         return(true);
     }
     return(false);
 }
Beispiel #6
0
        /// <summary>
        /// initializes the action
        /// </summary>
        public bool initWithAction(CCActionInterval action, float fRate)
        {
            Debug.Assert(action != null);

            m_pInnerAction = action;
            m_fSpeed       = fRate;

            return(true);
        }
Beispiel #7
0
        /// <summary>
        /// Initializes the action with the inner action and the rate parameter
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fRate"></param>
        /// <returns></returns>
        public bool initWithAction(CCActionInterval pAction, float fRate)
        {
            if (base.initWithAction(pAction))
            {
                m_fRate = fRate;
                return(true);
            }

            return(false);
        }
Beispiel #8
0
        /// <summary>
        /// Initializes the action with the inner action and the period in radians (default is 0.3)
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fPeriod"></param>
        /// <returns></returns>
        public bool initWithAction(CCActionInterval pAction, float fPeriod)
        {
            if (base.initWithAction(pAction))
            {
                m_fPeriod = fPeriod;
                return(true);
            }

            return(false);
        }
Beispiel #9
0
        public static CCSpeed actionWithAction(CCActionInterval action, float fRate)
        {
            CCSpeed ret = new CCSpeed();

            if (ret != null && ret.initWithAction(action, fRate))
            {
                return(ret);
            }

            return(null);
        }
Beispiel #10
0
        /// <summary>
        /// Creates the action with the inner action and the rate parameter
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fRate"></param>
        /// <returns></returns>
        public new static CCEaseOut actionWithAction(CCActionInterval pAction, float fRate)
        {
            CCEaseOut pRet = new CCEaseOut();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction, fRate))
                {
                }
                else
                {
                }
            }

            return(pRet);
        }
Beispiel #11
0
        /// <summary>
        /// Creates the action with the inner action and the rate parameter
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fRate"></param>
        /// <returns></returns>
        public static new CCEaseIn actionWithAction(CCActionInterval pAction, float fRate)
        {
            CCEaseIn pRet = new CCEaseIn();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction, fRate))
                {
                    //pRet.autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }
            return(pRet);
        }
Beispiel #12
0
        /** creates the action */
        public new static CCEaseExponentialInOut actionWithAction(CCActionInterval pAction)
        {
            CCEaseExponentialInOut pRet = new CCEaseExponentialInOut();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction))
                {
                    //pRet->autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }

            return(pRet);
        }
Beispiel #13
0
        /// <summary>
        /// creates the action
        /// </summary>
        /// <param name="pAction"></param>
        /// <returns></returns>
        public static CCActionEase actionWithAction(CCActionInterval pAction)
        {
            CCActionEase pRet = new CCActionEase();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction))
                {
                    //pRet->autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }

            return(pRet);
        }
Beispiel #14
0
        /// <summary>
        /// Creates the action with the inner action and the period in radians (default is 0.3)
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fPeriod"></param>
        /// <returns></returns>
        public static CCEaseElastic actionWithAction(CCActionInterval pAction, float fPeriod)
        {
            CCEaseElastic pRet = new CCEaseElastic();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction, fPeriod))
                {
                    //pRet->autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }

            return(pRet);
        }
Beispiel #15
0
        public override CCObject copyWithZone(CCZone zone)
        {
            CCZone           tmpZone = zone;
            CCActionInterval ret     = null;

            if (tmpZone != null && tmpZone.m_pCopyObject != null)
            {
                ret = (CCActionInterval)(tmpZone.m_pCopyObject);
            }
            else
            {
                // action's base class , must be called using __super::copyWithZone(), after overriding from derived class
                Debug.Assert(false);

                ret     = new CCActionInterval();
                tmpZone = new CCZone(ret);
            }

            base.copyWithZone(tmpZone);

            ret.initWithDuration(m_fDuration);

            return(ret);
        }
Beispiel #16
0
 /// <summary>
 /// initializes the action
 /// </summary>
 /// <param name="pAction"></param>
 /// <returns></returns>
 public new bool initWithAction(CCActionInterval pAction)
 {
     return(initWithAction(pAction, 0.3f));
 }