Exemplo n.º 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);
        }
Exemplo n.º 2
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));
        }