public override void onEnter()
        {
            base.onEnter();

            alignSpritesLeft(2);

            // Test:
            //   Sequence should work both with IntervalAction and InstantActions
            CCActionInterval move1 = CCMoveBy.actionWithDuration(1, new CCPoint(250,0));
            CCActionInterval move2 = CCMoveBy.actionWithDuration(1, new CCPoint(0,50));
            CCToggleVisibility tog1 = new CCToggleVisibility();
            CCToggleVisibility tog2 = new CCToggleVisibility();
            CCFiniteTimeAction seq = CCSequence.actions( move1, tog1, move2, tog2, move1.reverse());
            CCActionInterval action = CCRepeat.actionWithAction((CCActionInterval)(CCSequence.actions(seq, seq.reverse())), 3);

            // Test:
            //   Also test that the reverse of Hide is Show, and vice-versa
            m_kathia.runAction(action);

            CCActionInterval move_tamara = CCMoveBy.actionWithDuration(1, new CCPoint(100,0));
            CCActionInterval move_tamara2 = CCMoveBy.actionWithDuration(1, new CCPoint(50,0));
            CCActionInstant hide = new CCHide();
            CCFiniteTimeAction seq_tamara = CCSequence.actions( move_tamara, hide, move_tamara2);
            CCFiniteTimeAction seq_back = seq_tamara.reverse();
            m_tamara.runAction( CCSequence.actions( seq_tamara, seq_back));
        }
Example #2
0
        public override void OnEnter()
        {
            base.OnEnter();

            alignSpritesLeft(2);

            // Test:
            //   Sequence should work both with IntervalAction and InstantActions
            var move1 = new CCMoveBy (1, new CCPoint(250, 0));
            var move2 = new CCMoveBy (1, new CCPoint(0, 50));
            var tog1 = new CCToggleVisibility();
            var tog2 = new CCToggleVisibility();
            var seq = CCSequence.FromActions(move1, tog1, move2, tog2, move1.Reverse());
            var action = new CCRepeat ((CCSequence.FromActions(seq, seq.Reverse())), 3);

            // Test:
            //   Also test that the reverse of Hide is Show, and vice-versa
            m_kathia.RunAction(action);

            var move_tamara = new CCMoveBy (1, new CCPoint(100, 0));
            var move_tamara2 = new CCMoveBy (1, new CCPoint(50, 0));
            var hide = new CCHide();
            var seq_tamara = CCSequence.FromActions(move_tamara, hide, move_tamara2);
            var seq_back = seq_tamara.Reverse();
            m_tamara.RunAction(CCSequence.FromActions(seq_tamara, seq_back));
        }
        public static new CCToggleVisibility action()
        {
            CCToggleVisibility pRet = new CCToggleVisibility();

            return(pRet);
        }
        public static new CCToggleVisibility action()
        {
            CCToggleVisibility pRet = new CCToggleVisibility();

            return pRet;
        }