示例#1
0
        public static CCLiquid actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCLiquid cCLiquid = new CCLiquid();

            if (cCLiquid != null)
            {
                cCLiquid.initWithWaves(wav, amp, gridSize, duration);
            }
            return(cCLiquid);
        }
示例#2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCLiquid cCLiquid = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCLiquid = new CCLiquid();
                pZone    = new CCZone(cCLiquid);
            }
            else
            {
                cCLiquid = (CCLiquid)pZone.m_pCopyObject;
            }
            base.copyWithZone(pZone);
            cCLiquid.initWithWaves(this.m_nWaves, this.m_fAmplitude, this.m_sGridSize, this.m_fDuration);
            return(cCLiquid);
        }
示例#3
0
        /** creates the action with amplitude, a grid and duration */
        public static CCLiquid actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCLiquid pAction = new CCLiquid();

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

            return(pAction);
        }
示例#4
0
        /** creates the action with amplitude, a grid and duration */
        public static CCLiquid actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCLiquid pAction = new CCLiquid();

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

            return pAction;
        }
示例#5
0
        public override void OnEnter()
        {
            base.OnEnter();

            //CCDirector::sharedDirector()->setProjection(CCDirectorProjection2D);

            CCActionInterval effect = new CCLiquid (1, 20, new CCGridSize(32, 24), 2);

            CCActionInterval stopEffect = (CCActionInterval)(CCSequence.FromActions(
                                                 effect,
                                                 new CCDelayTime (2),
                                                 new CCStopGrid()
                //					 [DelayTime::actionWithDuration:2],
                //					 [[effect copy] autorelease],
                                                 ));

            CCNode bg = GetChildByTag(EffectAdvanceScene.kTagBackground);
            bg.RunAction(stopEffect);
        }
示例#6
0
        public override object Copy(ICopyable pZone)
        {
            CCLiquid pCopy;
            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = (CCLiquid) (pZone);
            }
            else
            {
                pCopy = new CCLiquid();
                pZone = pCopy;
            }

            base.Copy(pZone);

            pCopy.InitWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);

            return pCopy;
        }
示例#7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCLiquid pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCLiquid)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCLiquid();
                pZone = pNewZone = new CCZone(pCopy);
            }

            // CCGrid3DAction::copyWithZone(pZone);
            base.copyWithZone(pZone);
            pCopy.initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);

            // CC_SAFE_DELETE(pNewZone);
            return pCopy;
        }
示例#8
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone   pNewZone = null;
            CCLiquid pCopy    = null;

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

            // CCGrid3DAction::copyWithZone(pZone);
            base.copyWithZone(pZone);
            pCopy.initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);

            // CC_SAFE_DELETE(pNewZone);
            return(pCopy);
        }
示例#9
0
 public CCLiquid(CCLiquid liquid)
 {
     InitWithWaves(liquid.m_nWaves, liquid.m_fAmplitude, liquid.m_sGridSize, liquid.m_fDuration);
 }
示例#10
0
 public static CCLiquid Create(int wav, float amp, CCGridSize gridSize, float duration)
 {
     var pAction = new CCLiquid();
     pAction.InitWithWaves(wav, amp, gridSize, duration);
     return pAction;
 }