Пример #1
0
 private Cycle(Cycle fromCycle)
 {
     Sequence = fromCycle.Sequence;
     _throttle = fromCycle._throttle;
     NextCycle = this;
     CycleKey = fromCycle.CycleKey;
 }
Пример #2
0
 public void StartAnimation(string cycleKey)
 {
     CurrentCycle = Cycle.GetAnimationCycle(cycleKey);
     StartAnimation();
 }
Пример #3
0
 public Cycle SetCurrentCycle(string cycleKey)
 {
     CurrentCycle = Cycle.GetAnimationCycle(cycleKey);
     return(CurrentCycle);
 }
Пример #4
0
        public static void LoadSprite()
        {
            FrameSequence seq = new FrameSequence();
            seq.AddFrame(sprtBmp, 0, 0);
            seq.AddFrame(sprtBmp, 1, 0);
            seq.AddFrame(sprtBmp, 2, 0);
            seq.AddFrame(sprtBmp, 3, 0);
            seq.SequenceCycleType = Gondwana.Common.Enums.CycleType.PingPong;

            Cycle cycle = new Cycle(seq, 0.03, "groovin");

            sprite = Sprites.CreateSprite(matrix, seq[0]);
            sprite.TileAnimator.CurrentCycle = cycle;
            sprite.RenderSize = new Size(50, 50);
            sprite.VertAlign = Gondwana.Common.Enums.VerticalAlignment.Top;
            sprite.HorizAlign = Gondwana.Common.Enums.HorizontalAlignment.Left;
            sprite.MoveSprite(3, 3);
            sprite.Visible = true;
            sprite.TileAnimator.StartAnimation();
            sprite.DetectCollision = CollisionDetection.All;

            //matrix2[1, 1].EnableAnimator = true;
            //matrix2[1, 1].TileAnimator.CurrentCycle = Cycles.GetAnimationCycle("groovin");
            //matrix2[1, 1].TileAnimator.StartAnimation();
        }