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)); }
public override void onEnter() { base.onEnter(); alignSpritesLeft(1); CCActionInterval move1 = CCMoveBy.actionWithDuration(1, new CCPoint(250, 0)); CCActionInterval move2 = CCMoveBy.actionWithDuration(1, new CCPoint(0, 50)); CCFiniteTimeAction seq = CCSequence.actions(move1, move2, move1.reverse()); CCFiniteTimeAction action = CCSequence.actions(seq, seq.reverse()); m_grossini.runAction(action); }