Example #1
0
        public static CCEaseElastic actionWithAction(CCActionInterval pAction, float fPeriod)
        {
            CCEaseElastic cCEaseElastic = new CCEaseElastic();

            if (cCEaseElastic != null)
            {
                cCEaseElastic.initWithAction(pAction, fPeriod);
            }
            return(cCEaseElastic);
        }
Example #2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCEaseElastic cCEaseElastic = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCEaseElastic = new CCEaseElastic();
                pZone         = new CCZone(cCEaseElastic);
            }
            else
            {
                cCEaseElastic = pZone.m_pCopyObject as CCEaseElastic;
            }
            cCEaseElastic.initWithAction((CCActionInterval)this.m_pOther.copy(), this.m_fPeriod);
            return(cCEaseElastic);
        }
        /// <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);
        }
        /// <summary>
        ///  creates the action
        /// </summary>
        /// <param name="pAction"></param>
        /// <returns></returns>
        public static new CCEaseElastic actionWithAction(CCActionInterval pAction)
        {
            CCEaseElastic pRet = new CCEaseElastic();

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

            return pRet;
        }
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone        pNewZone = null;
            CCEaseElastic pCopy    = null;

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

            pCopy.initWithAction((CCActionInterval)(m_pOther.copy()), m_fPeriod);

            return(pCopy);
        }
        public override CCObject copyWithZone(CCZone pZone) 
        {
            CCZone pNewZone = null;
            CCEaseElastic pCopy = null;

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

            pCopy.initWithAction((CCActionInterval)(m_pOther.copy()), m_fPeriod);

            return pCopy;
        }