コード例 #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 new static CCScaleBy actionWithDuration(float duration, float sx, float sy)
        {
            CCScaleBy pScaleBy = new CCScaleBy();

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

            return(pScaleBy);
        }
コード例 #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);
        }
コード例 #3
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCScaleBy.actionWithDuration(m_fDuration, 1 / m_fEndScaleX, 1 / m_fEndScaleY));
 }