Example #1
0
        public override void OnEnter()
        {
            base.OnEnter();

            var s = Layer.VisibleBoundsWorldspace.Size;

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

            var move_ease_inout1      = new CCEaseElasticInOut(move, 0.3f);
            var move_ease_inout_back1 = move_ease_inout1.Reverse();

            var move_ease_inout2      = new CCEaseElasticInOut(move, 0.45f);
            var move_ease_inout_back2 = move_ease_inout2.Reverse();

            var move_ease_inout3      = new CCEaseElasticInOut(move, 0.6f);
            var move_ease_inout_back3 = move_ease_inout3.Reverse();

            var delay = new CCDelayTime(0.25f);

            var seq1 = new CCSequence(move_ease_inout1, delay, move_ease_inout_back1, delay);
            var seq2 = new CCSequence(move_ease_inout2, delay, move_ease_inout_back2,
                                      delay);
            var seq3 = new CCSequence(move_ease_inout3, delay, move_ease_inout_back3,
                                      delay);

            m_tamara.RunAction(new CCRepeatForever(seq1));
            m_kathia.RunAction(new CCRepeatForever(seq2));
            m_grossini.RunAction(new CCRepeatForever(seq3));
        }
Example #2
0
        public override void OnEnter()
        {
            base.OnEnter();

            var s = CCDirector.SharedDirector.WinSize;

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

            var move_ease_inout1      = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.3f);
            var move_ease_inout_back1 = move_ease_inout1.Reverse();

            var move_ease_inout2      = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.45f);
            var move_ease_inout_back2 = move_ease_inout2.Reverse();

            var move_ease_inout3      = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.6f);
            var move_ease_inout_back3 = move_ease_inout3.Reverse();

            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(seq1));
            m_kathia.RunAction(new CCRepeatForever(seq2));
            m_grossini.RunAction(new CCRepeatForever(seq3));
        }