Exemple #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);
        }
Exemple #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;
        }
Exemple #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);
        }
Exemple #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;
        }
        /** 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;
        }
Exemple #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;
        }
Exemple #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);
        }
        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;
        }
Exemple #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;
 }