Example #1
0
        public override void OnEnter()
        {
            base.OnEnter();
            MoveBy move1 = new MoveBy(1, new PointF(250, 0));
            MoveBy move2 = new MoveBy(1, new PointF(0, 50));
            ToggleVisibility tog1 = new ToggleVisibility();
            ToggleVisibility tog2 = new ToggleVisibility();
            Sequence seq = Sequence.Construct(move1, tog1, move2, tog2, move1.Reverse() as FiniteTimeAction);
            Repeat action = new Repeat(Sequence.Construct(seq, seq.Reverse() as FiniteTimeAction), 3);

            _grossini.RunAction(action);

            MoveBy move_tamara = new MoveBy(1, new PointF(100, 0));
            MoveBy move_tamara2 = new MoveBy(1, new PointF(50, 0));
            Hide hide = new Hide();
            Sequence seq_tamara = Sequence.Construct(move_tamara, hide, move_tamara2);
            Sequence seq_back = seq_tamara.Reverse() as Sequence;
            _tamara.RunAction(Sequence.Construct(seq_tamara, seq_back));
        }
Example #2
0
        public override void OnEnter()
        {
            base.OnEnter();

            MoveBy a1 = new MoveBy(1, new PointF(150, 0));
            Repeat action1 = new Repeat(new Sequence(new Place(new PointF(60, 60)), a1), 3);
            RepeatForever action2 = new RepeatForever(new Sequence(a1.Clone() as FiniteTimeAction, a1.Reverse() as FiniteTimeAction));

            _grossini.RunAction(action1);
            _tamara.RunAction(action2);
        }