Ejemplo n.º 1
0
        public static CCTwirl actionWithPosition(CCPoint pos, int t, float amp, ccGridSize gridSize, float duration)
        {
            CCTwirl cCTwirl = new CCTwirl();

            if (cCTwirl.initWithPosition(pos, t, amp, gridSize, duration))
            {
                return(cCTwirl);
            }
            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  creates the action with center position, number of twirls, amplitude, a grid size and duration
        /// </summary>
        public static CCTwirl actionWithPosition(CCPoint pos, int t, float amp, ccGridSize gridSize,
            float duration)
        {
            CCTwirl pAction = new CCTwirl();

            if (pAction.initWithPosition(pos, t, amp, gridSize, duration))
            {
                return pAction;
            }

            return null;
        }
Ejemplo n.º 3
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCTwirl cCTwirl = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCTwirl = new CCTwirl();
                pZone   = new CCZone(cCTwirl);
            }
            else
            {
                cCTwirl = (CCTwirl)pZone.m_pCopyObject;
            }
            base.copyWithZone(pZone);
            cCTwirl.initWithPosition(this.m_position, this.m_nTwirls, this.m_fAmplitude, this.m_sGridSize, this.m_fDuration);
            return(cCTwirl);
        }
Ejemplo n.º 4
0
        public override object Copy(ICopyable pZone)
        {
            CCTwirl pCopy;
            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = (CCTwirl) (pZone);
            }
            else
            {
                pCopy = new CCTwirl();
                pZone =  (pCopy);
            }

            base.Copy(pZone);

            pCopy.InitWithPosition(m_position, m_nTwirls, m_fAmplitude, m_sGridSize, m_fDuration);
            return pCopy;
        }
Ejemplo n.º 5
0
        /** creates the action with center position, number of twirls, amplitude, a grid size and duration */
        public static CCTwirl actionWithPosition(CCPoint pos, int t, float amp, ccGridSize gridSize,
            float duration)
        {
            CCTwirl pAction = new CCTwirl();

            if (pAction != null)
            {
                if (pAction.initWithPosition(pos, t, amp, gridSize, duration))
                {
                    // pAction->autorelease();
                }
                else
                {
                    // CC_SAFE_RELEASE_NULL(pAction);
                }
            }

            return pAction;
        }
Ejemplo n.º 6
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCTwirl pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCTwirl)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCTwirl();
                pZone = pNewZone = new CCZone(pCopy);
            }

            base.copyWithZone(pZone);

            pCopy.initWithPosition(m_position, m_nTwirls, m_fAmplitude, m_sGridSize, Duration);
            return pCopy;
        }
Ejemplo n.º 7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone  pNewZone = null;
            CCTwirl pCopy    = null;

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

            base.copyWithZone(pZone);

            pCopy.initWithPosition(m_position, m_nTwirls, m_fAmplitude, m_sGridSize, Duration);
            return(pCopy);
        }
Ejemplo n.º 8
0
        public virtual CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCTwirl pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCTwirl)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCTwirl();
                pZone = pNewZone = new CCZone(pCopy);
            }

            // CCGrid3DAction::copyWithZone(pZone);
            copyWithZone(pZone);

            pCopy.initWithPosition(m_position, m_nTwirls, m_fAmplitude, m_sGridSize, m_fDuration);

            // CC_SAFE_DELETE(pNewZone);
            return pCopy;
        }
Ejemplo n.º 9
0
 public static CCTwirl Create(CCPoint pos, int t, float amp, CCGridSize gridSize, float duration)
 {
     var pAction = new CCTwirl();
     pAction.InitWithPosition(pos, t, amp, gridSize, duration);
     return pAction;
 }