コード例 #1
0
 public static void closePizzazz()
 {
     if (Instance != null)
     {
         Sound.stopVillageEnvironmentalExceptWorld();
         Instance.Close();
         Instance = null;
     }
 }
コード例 #2
0
 public static void closePizzazz()
 {
     if (Instance != null)
     {
         Sound.stopVillageEnvironmentalExceptWorld();
         Instance.Close();
         Instance = null;
     }
 }
コード例 #3
0
 public static void showPizzazz(int pizzazzImage)
 {
     if (Instance == null)
     {
         Instance = new PizzazzPopupWindow();
         Instance.init(pizzazzImage);
         Form parentForm = InterfaceMgr.Instance.ParentForm;
         Instance.Location = new Point((parentForm.Location.X + (parentForm.Width / 2)) - (Instance.Width / 2), ((parentForm.Location.Y + (parentForm.Height / 2)) - (Instance.Height / 2)) - 20);
         Instance.Show(parentForm);
     }
 }
コード例 #4
0
 public static void showPizzazz(int pizzazzImage)
 {
     if (Instance == null)
     {
         Instance = new PizzazzPopupWindow();
         Instance.init(pizzazzImage);
         Form parentForm = InterfaceMgr.Instance.ParentForm;
         Instance.Location = new Point((parentForm.Location.X + (parentForm.Width / 2)) - (Instance.Width / 2), ((parentForm.Location.Y + (parentForm.Height / 2)) - (Instance.Height / 2)) - 20);
         Instance.Show(parentForm);
     }
 }
コード例 #5
0
        public void update()
        {
            this.firework1.update();
            this.firework2.update();
            this.firework3.update();
            this.firework4.update();
            this.firework5.update();
            this.firework6.update();
            this.firework7.update();
            this.firework8.update();
            this.firework9.update();
            this.firework10.update();
            this.firework1a.update();
            this.firework2a.update();
            this.firework3a.update();
            this.firework4a.update();
            this.firework5a.update();
            this.firework6a.update();
            this.firework7a.update();
            this.firework8a.update();
            this.firework9a.update();
            this.firework10a.update();
            base.Invalidate();
            this.animCount++;
            if (this.animCount >= 180)
            {
                PizzazzPopupWindow.closePizzazz();
            }
            else if (this.animCount > 150)
            {
                Firework.active = false;
            }
            if (this.starSpinMode > 0)
            {
                switch (this.starSpinMode)
                {
                case 1:
                    this.starImage.Image   = (Image)GFXLibrary.wheel_star[2];
                    this.starImage.Visible = true;
                    this.starImage.Alpha   = 0.01f;
                    this.starSpinMode++;
                    this.starRotate      = 0f;
                    this.starRotateSpeed = 8f;
                    this.starSpinCount   = 200;
                    break;

                case 2:
                    this.starImage.Alpha += 0.2f;
                    if (this.starImage.Alpha > 1f)
                    {
                        this.starImage.Alpha = 1f;
                        this.starSpinMode++;
                    }
                    break;

                case 3:
                    this.starSpinCount--;
                    if (this.starSpinCount == 0)
                    {
                        this.starSpinMode++;
                    }
                    break;

                case 4:
                    this.starImage.Alpha -= 0.1f;
                    if (this.starImage.Alpha < 0f)
                    {
                        this.starImage.Alpha   = 0f;
                        this.starImage.Visible = false;
                        this.starSpinMode      = 0;
                        this.starRotateSpeed   = 0f;
                    }
                    break;
                }
                float starRotate = this.starRotate;
                if ((starRotate >= 179.9f) && (starRotate <= 180f))
                {
                    starRotate = 179.9f;
                }
                else if ((starRotate > 180f) && (starRotate <= 180.1f))
                {
                    starRotate = 180.1f;
                }
                this.starImage.Rotate = starRotate;
                this.starRotate      += this.starRotateSpeed;
                if (this.starRotate >= 360f)
                {
                    this.starRotate -= 360f;
                }
                if (this.starRotateSpeed <= 8f)
                {
                    this.starImage.Image = (Image)GFXLibrary.wheel_star[0];
                }
                else if (this.starRotateSpeed < 15f)
                {
                    this.starImage.Image = (Image)GFXLibrary.wheel_star[1];
                }
                else
                {
                    this.starImage.Image = (Image)GFXLibrary.wheel_star[2];
                }
                this.starImage.invalidate();
            }
        }