Пример #1
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCGridAction pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCGridAction)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCGridAction();
                pZone = pNewZone = new CCZone(pCopy);
            }

            base.copyWithZone(pZone);

            pCopy.initWithSize(m_sGridSize, Duration);

            if (pNewZone != null)
            {
                pNewZone = null;
            }
            return pCopy;
        }
Пример #2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone       pNewZone = null;
            CCGridAction pCopy    = null;

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

            base.copyWithZone(pZone);

            pCopy.initWithSize(m_sGridSize, Duration);

            if (pNewZone != null)
            {
                pNewZone = null;
            }
            return(pCopy);
        }
Пример #3
0
        /// <summary>
        /// creates the action with size and duration
        /// </summary>
        public static CCGridAction actionWithSize(ccGridSize gridSize, float duration)
        {
            CCGridAction pAction = new CCGridAction();
            if (pAction.initWithSize(gridSize, duration))
            {
                return pAction;
            }

            return null;
        }
Пример #4
0
        /// <summary>
        /// creates the action with size and duration
        /// </summary>
        public static CCGridAction actionWithSize(ccGridSize gridSize, float duration)
        {
            CCGridAction pAction = new CCGridAction();

            if (pAction.initWithSize(gridSize, duration))
            {
                return(pAction);
            }

            return(null);
        }