Ejemplo n.º 1
0
 private void btnAnimationsDelete_Click(object sender, EventArgs e)
 {
     //Remove anim
     if (SelectedAnimation != null)
     {
         Kart.RemoveAnimation(SelectedAnimation);
         PopulateAnimations();
         //PopulateAnimationImages();
         //UpdateKartPreviewAnimation();
         //UpdateAnimationEnableds();
     }
 }
Ejemplo n.º 2
0
        private void BetaSetUpAnimations(List <string> orderedKartNames)
        {
            //Clear animations
            while (Kart.Kart.KartAnimations.Count > 0)
            {
                Kart.RemoveAnimation(Kart.Kart.KartAnimations[0]);
            }

            //Okay, here's where we set up the new animations & images in them.
            //Image order:
            //1  1-21 : -25 turn
            //2  22-42 : -19 turn
            //3  43-63 : -12 turn
            //4  64-84 : -6 turn
            //5  85-105 : 0 turn
            //6  106-126 : 6 turn
            //7  127-147 : 12 turn
            //8  148-168 : 19 turn
            //9  169-189 : 25 turn
            //10 190-209 : -25 spin
            //11 210-229 : -12 spin
            //12 230-249 : 0 spin
            //13 250-269 : 12 spin
            //14 270-289 : 25 spin
            //15 290-321 : crash


            Kart.AddNewAnimation("Turn Down 25");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[0], i, Kart.Kart.KartImages.Images[orderedKartNames[i]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[0], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnDown25);

            Kart.AddNewAnimation("Turn Down 19");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[1], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 21]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[1], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnDown19);

            Kart.AddNewAnimation("Turn Down 12");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[2], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 42]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[2], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnDown12);

            Kart.AddNewAnimation("Turn Down 6");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[3], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 63]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[3], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnDown6);

            Kart.AddNewAnimation("Turn 0");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[4], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 84]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[4], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurn0);

            Kart.AddNewAnimation("Turn Up 6");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[5], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 105]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[5], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnUp6);

            Kart.AddNewAnimation("Turn Up 12");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[6], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 126]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[6], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnUp12);

            Kart.AddNewAnimation("Turn Up 19");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[7], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 147]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[7], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnUp19);

            Kart.AddNewAnimation("Turn Up 25");
            for (int i = 0; i < 21; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[8], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 168]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[8], (int)KartAnimationSeries.KartAnimationTypeFlag.RearTurnUp25);


            Kart.AddNewAnimation("Spin Down 25");
            for (int i = 0; i < 20; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[9], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 189]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[9],
                                  (int)(KartAnimationSeries.KartAnimationTypeFlag.FullSpinDown25 | KartAnimationSeries.KartAnimationTypeFlag.FullSpinDown19));

            Kart.AddNewAnimation("Spin Down 12");
            for (int i = 0; i < 20; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[10], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 209]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[10], (int)KartAnimationSeries.KartAnimationTypeFlag.FullSpinDown12);

            Kart.AddNewAnimation("Spin 0");
            for (int i = 0; i < 20; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[11], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 229]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[11],
                                  (int)(KartAnimationSeries.KartAnimationTypeFlag.FullSpinDown6 | KartAnimationSeries.KartAnimationTypeFlag.FullSpin0 | KartAnimationSeries.KartAnimationTypeFlag.FullSpinUp6));

            Kart.AddNewAnimation("Spin Up 12");
            for (int i = 0; i < 20; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[12], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 249]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[12], (int)KartAnimationSeries.KartAnimationTypeFlag.FullSpinUp12);

            Kart.AddNewAnimation("Spin Up 25");
            for (int i = 0; i < 20; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[13], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 269]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[13],
                                  (int)(KartAnimationSeries.KartAnimationTypeFlag.FullSpinUp25 | KartAnimationSeries.KartAnimationTypeFlag.FullSpinUp19));


            Kart.AddNewAnimation("Crash");
            for (int i = 0; i < 32; i++)
            {
                Kart.AddImagetoAnimation(Kart.Kart.KartAnimations[14], i, Kart.Kart.KartImages.Images[orderedKartNames[i + 289]]);
            }
            Kart.SetAnimationType(Kart.Kart.KartAnimations[14], (int)KartAnimationSeries.KartAnimationTypeFlag.Crash);

            //What else to do here??
        }