示例#1
0
        /// <summary>
        /// creates the action with and X factor and a Y factor
        /// </summary>
        /// <param name="duration"></param>
        /// <param name="sx"></param>
        /// <param name="sy"></param>
        /// <returns></returns>
        public static CCScaleTo actionWithDuration(float duration, float sx, float sy)
        {
            CCScaleTo pScaleTo = new CCScaleTo();

            pScaleTo.initWithDuration(duration, sx, sy);
            //pScaleTo->autorelease();

            return(pScaleTo);
        }
示例#2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone    pNewZone = null;
            CCScaleTo pCopy    = null;

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

            base.copyWithZone(pZone);

            pCopy.initWithDuration(m_fDuration, m_fEndScaleX, m_fEndScaleY);

            //CC_SAFE_DELETE(pNewZone);
            return(pCopy);
        }