Example #1
0
        public StressTest2()
        {
            CCSize s = CCDirector.SharedDirector.WinSize;

            CCLayer sublayer = new CCLayer();

            CCSprite sp1 = new CCSprite(TestResource.s_pPathSister1);
            sp1.Position = (new CCPoint(80, s.Height / 2));

            CCActionInterval move = new CCMoveBy (3, new CCPoint(350, 0));
            CCActionInterval move_ease_inout3 = new CCEaseInOut((CCActionInterval) (move.Copy()), 2.0f);
            var move_ease_inout_back3 = (CCActionInterval) move_ease_inout3.Reverse();
            CCFiniteTimeAction seq3 = CCSequence.FromActions(move_ease_inout3, move_ease_inout_back3);
            sp1.RunAction(new CCRepeatForever ((CCActionInterval) seq3));
            sublayer.AddChild(sp1, 1);

            CCParticleFire fire = CCParticleFire.Create();
            fire.Texture = (CCTextureCache.SharedTextureCache.AddImage("Images/fire"));
            fire.Position = (new CCPoint(80, s.Height / 2 - 50));

            var copy_seq3 = (CCActionInterval) (seq3.Copy());

            fire.RunAction(new CCRepeatForever (copy_seq3));
            sublayer.AddChild(fire, 2);

            Schedule((shouldNotLeak), 6.0f);

            AddChild(sublayer, 0, CocosNodeTestStaticLibrary.kTagSprite1);
        }
Example #2
0
        public static new CCEaseInOut actionWithAction(CCActionInterval pAction, float fRate)
        {
            CCEaseInOut cCEaseInOut = new CCEaseInOut();

            if (cCEaseInOut != null)
            {
                cCEaseInOut.initWithAction(pAction, fRate);
            }
            return(cCEaseInOut);
        }
Example #3
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCEaseInOut cCEaseInOut = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCEaseInOut = new CCEaseInOut();
                pZone       = new CCZone(cCEaseInOut);
            }
            else
            {
                cCEaseInOut = pZone.m_pCopyObject as CCEaseInOut;
            }
            cCEaseInOut.initWithAction((CCActionInterval)this.m_pOther.copy(), this.m_fRate);
            return(cCEaseInOut);
        }
Example #4
0
        /// <summary>
        /// Creates the action with the inner action and the rate parameter
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fRate"></param>
        /// <returns></returns>
        public new static CCEaseInOut actionWithAction(CCActionInterval pAction, float fRate)
        {
            CCEaseInOut pRet = new CCEaseInOut();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction, fRate))
                {
                    //pRet->autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }

            return(pRet);
        }
        /// <summary>
        /// Creates the action with the inner action and the rate parameter
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="fRate"></param>
        /// <returns></returns>
        public static new CCEaseInOut actionWithAction(CCActionInterval pAction, float fRate)
        {
            CCEaseInOut pRet = new CCEaseInOut();

            if (pRet != null)
            {
                if (pRet.initWithAction(pAction, fRate))
                {
                    //pRet->autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pRet);
                }
            }

            return pRet;
        }
Example #6
0
        public override object Copy(ICopyable pZone)
        {
            CCEaseInOut pCopy;

            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = pZone as CCEaseInOut;
            }
            else
            {
                pCopy = new CCEaseInOut();
            }

            pCopy.InitWithAction((CCActionInterval) (m_pOther.Copy()), m_fRate);

            return pCopy;
        }
Example #7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone      pNewZone = null;
            CCEaseInOut pCopy    = null;

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

            pCopy.initWithAction((CCActionInterval)(m_pOther.copy()), m_fRate);

            return(pCopy);
        }
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCEaseInOut pCopy = null;

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

            pCopy.initWithAction((CCActionInterval)(m_pOther.copy()), m_fRate);

            return pCopy;
        }
Example #9
0
 public override CCFiniteTimeAction Reverse()
 {
     return(CCEaseInOut.actionWithAction((CCActionInterval)m_pOther.Reverse(), m_fPeriod));
 }
 public virtual CCFiniteTimeAction easeActionWithAction(CCActionInterval action)
 {
     return(CCEaseInOut.actionWithAction(action, 3f));
 }
Example #11
0
        public override void OnEnter()
        {
            base.OnEnter();

            var size = CCDirector.SharedDirector.WinSize;

            var move = new CCMoveBy (3, new CCPoint(size.Width - 130, 0));

            var move_ease_inout1 = new CCEaseInOut((CCActionInterval) move.Copy(), 0.65f);
            var move_ease_inout_back1 = move_ease_inout1.Reverse();

            var move_ease_inout2 = new CCEaseInOut((CCActionInterval) move.Copy(), 1.35f);
            var move_ease_inout_back2 = move_ease_inout2.Reverse();

            var move_ease_inout3 = new CCEaseInOut((CCActionInterval) move.Copy(), 1.0f);
            var move_ease_inout_back3 = move_ease_inout3.Reverse() as CCActionInterval;

            var delay = new CCDelayTime (0.25f);

            var seq1 = CCSequence.FromActions(move_ease_inout1, delay, move_ease_inout_back1, (CCFiniteTimeAction) delay.Copy());
            var seq2 = CCSequence.FromActions(move_ease_inout2, (CCFiniteTimeAction) delay.Copy(), move_ease_inout_back2,
                                                (CCFiniteTimeAction) delay.Copy());
            var seq3 = CCSequence.FromActions(move_ease_inout3, (CCFiniteTimeAction) delay.Copy(), move_ease_inout_back3,
                                                (CCFiniteTimeAction) delay.Copy());

            m_tamara.RunAction(new CCRepeatForever ((CCActionInterval)seq1));
            m_kathia.RunAction(new CCRepeatForever ((CCActionInterval)seq2));
            m_grossini.RunAction(new CCRepeatForever ((CCActionInterval)seq3));
        }
Example #12
0
 public static new CCEaseInOut Create(CCActionInterval pAction, float fRate)
 {
     var pRet = new CCEaseInOut();
     pRet.InitWithAction(pAction, fRate);
     return pRet;
 }
Example #13
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCEaseInOut.actionWithAction((CCActionInterval)this.m_pOther.reverse(), this.m_fRate));
 }
Example #14
0
 public CCEaseInOut(CCEaseInOut easeInOut)
     : base(easeInOut)
 {
 }