Example #1
0
File: SPECIAL.cs Project: THSJF/sjf
 public SPECIAL(
     PracticeData pdata,
     Sprite[] character,
     Texture2D blackbox,
     params Texture2D[] button)
 {
     for (int index = 0; index < 4; ++index)
     {
         if (pdata.clear[index])
         {
             this.cleared = true;
             break;
         }
     }
     if (!this.cleared)
     {
         this.selection = 1;
     }
     this.character   = character;
     this.black       = new Sprite(blackbox);
     this.black.scale = new Vector2(6.4f, 4.8f);
     this.button      = new Sprite[4];
     this.buttonon    = new Sprite[4];
     for (int index = 0; index < button.Length / 2; ++index)
     {
         this.button[index]          = new Sprite(button[index]);
         this.button[index].position = new Vector2((float)(44 + 20 * index - 30), (float)(285 + 30 * index));
     }
     for (int index = button.Length / 2; index < button.Length; ++index)
     {
         this.buttonon[index - button.Length / 2]          = new Sprite(button[index]);
         this.buttonon[index - button.Length / 2].position = new Vector2((float)(44 + 20 * (index - button.Length / 2) - 30), (float)(285 + 30 * (index - button.Length / 2)));
     }
     if (Main.SkiptoSCChanllenges)
     {
         this.step      = true;
         this.selection = 2;
     }
     this.pdata      = this.LoadPlayData();
     this.prdata     = this.LoadPracticeData();
     this.sdata      = this.Load("Content/Data/8.xna");
     this.achivrates = new int[3];
     for (int index1 = 0; index1 < 3; ++index1)
     {
         float num = 0.0f;
         for (int index2 = 0; index2 < this.sdata.ach[index1].achiv.Length; ++index2)
         {
             if (this.sdata.ach[index1].achiv[index2].get)
             {
                 ++num;
             }
         }
         this.achivrates[index1] = (int)((double)num / (double)this.sdata.ach[index1].achiv.Length * 100.0);
     }
     for (int index = 0; index < 4; ++index)
     {
         character[index].position = new Vector2(0.0f, 0.0f);
     }
 }
Example #2
0
File: ED.cs Project: THSJF/sjf
        private void SavePracticeData(PracticeData data)
        {
            FileStream fileStream = new FileStream("Content\\Data\\5.xna", FileMode.Create);

            new BinaryFormatter().Serialize((Stream)fileStream, (object)data);
            fileStream.Close();
            Cry.Encry("Content\\Data\\5.xna", 2);
        }
Example #3
0
File: SPECIAL.cs Project: THSJF/sjf
        private PracticeData LoadPracticeData()
        {
            Stream       serializationStream = Cry.Decry("Content\\Data\\5.xna", 2);
            PracticeData practiceData        = (PracticeData) new BinaryFormatter().Deserialize(serializationStream);

            serializationStream.Close();
            return(practiceData);
        }
Example #4
0
 public PRACTICE(PracticeData data, Texture2D blackbox, Sprite displaybox_s, Sprite[] level_s, Sprite crapwise_s, Sprite[] character_s, Sprite cinfo_s, Vector2[] crapwisexy_i, int selection_i, int selection2_i)
 {
     practicedata = data;
     displaybox   = displaybox_s;
     level        = level_s;
     crapwise     = crapwise_s;
     crapwisexy   = crapwisexy_i;
     character    = character_s;
     cinfo        = cinfo_s;
     selection    = selection_i;
     if (selection >= 5)
     {
         selection = 1;
     }
     selection2 = selection2_i;
     selection3 = 1;
     black      = blackbox;
     blackpos   = new Vector2(249f, 165f);
     time       = 0;
     time2      = 0;
 }
Example #5
0
File: Main.cs Project: THSJF/sjf
 protected override void Initialize()
 {
     try {
         Main.fpstimer = new System.Threading.Timer(new TimerCallback(this.FpsRecord), (object)null, 0, 1000);
         if (!File.Exists("Content/Music/00.xna"))
         {
             StreamWriter streamWriter = new StreamWriter("Content/Music/00.xna", false);
             streamWriter.WriteLine("Fantasy Danmaku Festival");
             streamWriter.WriteLine("0");
             streamWriter.Close();
             Cry.Encry("Content/Music/00.xna", 2);
         }
         if (!File.Exists("Content/Data/4.xna"))
         {
             PlayData   playData   = new PlayData();
             FileStream fileStream = new FileStream("Content/Data/4.xna", FileMode.Create);
             new BinaryFormatter().Serialize((Stream)fileStream, (object)playData);
             fileStream.Close();
             Cry.Encry("Content/Data/4.xna", 2);
         }
         if (!File.Exists("Content/Data/5.xna"))
         {
             PracticeData practiceData = new PracticeData();
             FileStream   fileStream   = new FileStream("Content/Data/5.xna", FileMode.Create);
             new BinaryFormatter().Serialize((Stream)fileStream, (object)practiceData);
             fileStream.Close();
             Cry.Encry("Content/Data/5.xna", 2);
         }
         if (!File.Exists("Content/Data/8.xna"))
         {
             SpecialData specialData = new SpecialData();
             FileStream  fileStream  = new FileStream("Content/Data/8.xna", FileMode.Create);
             new BinaryFormatter().Serialize((Stream)fileStream, (object)specialData);
             fileStream.Close();
             Cry.Encry("Content/Data/8.xna", 2);
         }
         if (!File.Exists("Content/Music/10.xna"))
         {
             new StreamWriter("Content/Data/10.xna", false).Close();
             Cry.Encry("Content/Data/10.xna", 2);
         }
         Main.rand    = new Random();
         Main.font    = new SpriteFontX(new Font("宋体", 12f, FontStyle.Regular, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.ClearTypeGridFit);
         Main.dfont   = new SpriteFontX(new Font("微软雅黑", 16f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.AntiAlias);
         Main.scfont  = new SpriteFontX(new Font("宋体", 16f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.AntiAlias);
         Main.scdfont = new SpriteFontX(new Font("宋体", 10f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.SingleBitPerPixelGridFit);
         PadState.InitPad(Main.ini);
         Main.WindowSizeType = int.Parse(Main.ini.ReadValue("Graphics", "WindowSize"));
         Main.Fullorwindow   = int.Parse(Main.ini.ReadValue("Mode", "Full/Window"));
         Main.BackGround     = int.Parse(Main.ini.ReadValue("Graphics", "BackGround")) == 1;
         Main.VSync          = int.Parse(Main.ini.ReadValue("Graphics", "VSync")) == 1;
         this.graphics.SynchronizeWithVerticalRetrace = Main.VSync;
         this.IsFixedTimeStep = false;
         Main.ResizeWindow(this, Main.WindowSizeType);
         if (Main.Fullorwindow == 1)
         {
             this.graphics.ToggleFullScreen();
         }
         Sound.Init();
         Music.Init();
         Main.stage = "ENTRANCE";
         base.Initialize();
     } catch (Exception ex) {
         StreamWriter streamWriter = new StreamWriter("Error.txt");
         DateTime     now          = DateTime.Now;
         streamWriter.Write("[" + now.Hour.ToString("00") + ":" + now.Minute.ToString("00") + ":" + now.Second.ToString("00") + "]\n" + ex.ToString());
         streamWriter.Close();
         Main.Message(ex.ToString());
     }
 }
Example #6
0
File: ED.cs Project: THSJF/sjf
        public ED(bool continued, int edtype, GraphicsDevice g, RecordSave record, ReplaySave replay)
        {
            this.ifcontinued = continued;
            this.edtype      = edtype;
            this.record      = record;
            this.replay      = replay;
            this.gd          = g;
            GC.Collect();
            BGM.Disposes();
            PracticeData practiceData = this.LoadPracticeData();

            if (edtype == 1)
            {
                for (int index = 0; index < 4; ++index)
                {
                    if (practiceData.clear[index])
                    {
                        this.ifsaw = true;
                        break;
                    }
                }
            }
            Program.game.achivmanager.Check(AchievementType.Normal, 2, new Hashtable()
            {
                [(object)"ok"] = (object)(!this.ifcontinued & edtype == 1)
            });
            Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable()
            {
                [(object)"level"] = (object)Main.Level
            });
            if (edtype == 1 && !this.ifsaw || edtype == 4)
            {
                if (!this.ifcontinued || edtype == 4)
                {
                    this.praticle  = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\List\\praticle.xna", 0));
                    this.praticle1 = new SimplePraticleActor(new Vector2(470f, 0.0f), new Vector2(400f, 100f), 10, 3);
                    this.praticle1.SetTexture(this.praticle, new Rectangle(155, 6, 32, 22), new Vector2(16f, 11f), true);
                    this.praticle1.SetPraticle(new Vector2(1f, 1f), new Vector2(-0.7f, 0.8f), 0.0f, Vector2.Zero, 0.0f, new Vector2(0.0f, 360f));
                    this.praticle1.SetPraticleEvent(new PraticleUpdate(this.Praticle1Update));
                    this.text       = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\31.xna", 0));
                    this.textcolor  = new float[4];
                    this.white      = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\32.xna", 0));
                    this.background = new Sprite[4];
                    for (int index = 0; index < 4; ++index)
                    {
                        Texture2D t = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (1 + index).ToString() + ".xna", 0));
                        this.background[index]          = new Sprite(t);
                        this.background[index].origin   = new Vector2((float)(t.Width / 2), (float)(t.Height / 2));
                        this.background[index].position = new Vector2(320f, 240f);
                        this.background[index].scale    = new Vector2(2f, 2f);
                    }
                    Texture2D t1 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Pattern\\logo.xna", 0));
                    this.logo           = new Sprite(t1);
                    this.logo.origin    = new Vector2((float)(t1.Width / 2), (float)(t1.Height / 2));
                    this.logo.position  = new Vector2(320f, 240f);
                    this.logo.scale     = new Vector2(1.2f, 1.2f);
                    this.end            = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\33.xna", 0)));
                    this.black          = new Sprite(this.white);
                    this.black.position = new Vector2(640f, 0.0f);
                    this.black.color.r  = this.black.color.g = this.black.color.b = 0.0f;
                    this.staff          = new Sprite[6];
                    for (int index = 0; index < 6; ++index)
                    {
                        this.staff[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (34 + index).ToString() + ".xna", 0)));
                    }
                    this.background2 = new Sprite[2];
                    for (int index = 0; index < 2; ++index)
                    {
                        Texture2D t2 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (40 + index).ToString() + ".xna", 0));
                        this.background2[index]          = new Sprite(t2);
                        this.background2[index].origin   = new Vector2((float)(t2.Width / 2), (float)(t2.Height / 2));
                        this.background2[index].position = new Vector2(320f, 240f);
                        this.background2[index].scale    = new Vector2(1f, 1f);
                    }
                    this.staff2 = new Sprite[4];
                    for (int index = 0; index < 4; ++index)
                    {
                        this.staff2[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (42 + index).ToString() + ".xna", 0)));
                    }
                    this.white2 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\32.xna", 0));
                    this.thanks = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\46.xna", 0)));
                    this.next   = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\47.xna", 0)));
                }
                else
                {
                    Program.game.PlaySound("Result bank");
                    this.dialogbg = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\53.xna", 0)));
                    this.dialog   = new Sprite[4];
                    for (int index = 0; index < 4; ++index)
                    {
                        this.dialog[index]            = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (48 + index).ToString() + ".xna", 0)));
                        this.dialog[index].position.Y = 30f;
                    }
                    this.tip = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\52.xna", 0)));
                }
            }
            else if (!this.ifcontinued)
            {
                this.time = 7141;
                Program.game.PlaySound("Result bank");
            }
            else
            {
                Program.game.PlaySound("Result bank");
                this.dialogbg = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\53.xna", 0)));
                this.dialog   = new Sprite[4];
                for (int index = 0; index < 4; ++index)
                {
                    this.dialog[index]            = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (48 + index).ToString() + ".xna", 0)));
                    this.dialog[index].position.Y = 30f;
                }
                this.tip = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\52.xna", 0)));
            }
        }
Example #7
0
File: ED.cs Project: THSJF/sjf
 public void Update()
 {
     if (!this.ifcontinued || this.edtype == 4)
     {
         if (this.time == 120)
         {
             Music.BGM = Music.SB.GetCue("14");
             Music.BGM.Play();
             StreamReader streamReader = new StreamReader(Cry.Decry("Content/Music/00.xna", 2));
             streamReader.ReadLine();
             int num = int.Parse(streamReader.ReadLine());
             streamReader.Close();
             if (num < 13)
             {
                 StreamWriter streamWriter = new StreamWriter("Content/Music/00.xna", false);
                 streamWriter.WriteLine("Fantasy Danmaku Festival");
                 streamWriter.WriteLine(13.ToString());
                 streamWriter.Close();
                 Cry.Encry("Content/Music/00.xna", 2);
             }
             this.praticle1.Start();
         }
         else if (this.time > 180 && this.time <= 380)
         {
             this.textcolor[0] += 0.005f;
         }
         else if (this.time > 600 && this.time <= 800)
         {
             this.textcolor[1] += 0.005f;
         }
         else if (this.time > 1020 && this.time <= 1220)
         {
             this.textcolor[2] += 0.005f;
         }
         else if (this.time > 1440 && this.time <= 1640)
         {
             this.textcolor[3] += 0.005f;
         }
         else if (this.time > 1740 && this.time <= 1800)
         {
             this.whitecolor += 0.01666667f;
         }
         else if (this.time > 1820 && this.time <= 1840)
         {
             this.background[0].color.a += 0.05f;
             this.background[0].scale   += new Vector2((float)((0.800000011920929 - (double)this.background[0].scale.X) / 15.0), (float)((0.800000011920929 - (double)this.background[0].scale.Y) / 15.0));
             this.logo.color.a          += 0.05f;
             this.logo.scale            += new Vector2((float)((0.699999988079071 - (double)this.logo.scale.X) / 20.0), (float)((0.699999988079071 - (double)this.logo.scale.Y) / 20.0));
         }
         else if (this.time > 1840 && this.time <= 2200)
         {
             this.background[0].scale -= new Vector2(0.00065f, 0.00065f);
             this.logo.scale          -= new Vector2(0.0003f, 0.0003f);
             if (this.time > 2020 && this.time <= 2040)
             {
                 this.end.color.a += 0.05f;
             }
             if (this.time == 2200)
             {
                 this.praticle1.Stop();
             }
         }
         else if (this.time > 2200 && this.time <= 2250)
         {
             this.background[0].position.X += (float)((0.0 - (double)this.background[0].position.X) / 40.0);
             this.logo.color.a             -= 0.05f;
             if ((double)this.logo.color.a <= 0.0)
             {
                 this.logo.color.a = 0.0f;
             }
             this.end.color.a      -= 0.02f;
             this.black.position.X += (float)((182.0 - (double)this.black.position.X) / 15.0);
             this.black.color.a     = 1f;
         }
         else if (this.time > 2260 && this.time <= 2670)
         {
             if (this.time == 2300)
             {
                 this.praticle1 = (SimplePraticleActor)null;
             }
             this.background[0].position.X += 0.1f;
             this.staff[0].color.a         += 0.01f;
             if ((double)this.staff[0].color.a >= 1.0)
             {
                 this.staff[0].color.a = 1f;
             }
         }
         else if (this.time > 2670 && this.time <= 3080)
         {
             this.background[0].position.X += 0.1f;
             this.background[1].position    = this.background[0].position;
             this.background[1].scale       = this.background[0].scale;
             this.background[1].color.a    += 0.005f;
             if ((double)this.background[1].color.a >= 1.0)
             {
                 this.background[1].color.a = 1f;
             }
             this.staff[0].color.a -= 0.02f;
             if ((double)this.staff[0].color.a <= 0.0)
             {
                 this.staff[0].color.a = 0.0f;
             }
             this.staff[1].color.a += 0.01f;
             if ((double)this.staff[1].color.a >= 1.0)
             {
                 this.staff[1].color.a = 1f;
             }
         }
         else if (this.time > 3080 && this.time <= 3490)
         {
             this.background[0].position.X += 0.1f;
             this.background[1].position    = this.background[0].position;
             this.staff[1].color.a         -= 0.02f;
             if ((double)this.staff[1].color.a <= 0.0)
             {
                 this.staff[1].color.a = 0.0f;
             }
             this.staff[2].color.a += 0.01f;
             if ((double)this.staff[2].color.a >= 1.0)
             {
                 this.staff[2].color.a = 1f;
             }
         }
         else if (this.time > 3490 && this.time <= 3900)
         {
             this.background[0].position.X += 0.1f;
             this.background[1].position    = this.background[0].position;
             this.background[2].position    = this.background[0].position;
             this.background[2].scale       = this.background[0].scale;
             this.background[2].color.a    += 0.005f;
             if ((double)this.background[2].color.a >= 1.0)
             {
                 this.background[2].color.a = 1f;
             }
             this.staff[2].color.a -= 0.02f;
             if ((double)this.staff[2].color.a <= 0.0)
             {
                 this.staff[2].color.a = 0.0f;
             }
             this.staff[3].color.a += 0.01f;
             if ((double)this.staff[3].color.a >= 1.0)
             {
                 this.staff[3].color.a = 1f;
             }
         }
         else if (this.time > 3900 && this.time <= 4310)
         {
             this.background[0].position.X += 0.1f;
             this.background[2].position    = this.background[0].position;
             this.staff[3].color.a         -= 0.02f;
             if ((double)this.staff[3].color.a <= 0.0)
             {
                 this.staff[3].color.a = 0.0f;
             }
             this.staff[4].color.a += 0.01f;
             if ((double)this.staff[4].color.a >= 1.0)
             {
                 this.staff[4].color.a = 1f;
             }
         }
         else if (this.time > 4310 && this.time <= 4750)
         {
             this.background[0].position.X += 0.1f;
             this.background[2].position    = this.background[0].position;
             this.background[3].position    = this.background[0].position;
             this.background[3].scale       = this.background[0].scale;
             this.background[3].color.a    += 0.005f;
             if ((double)this.background[3].color.a >= 1.0)
             {
                 this.background[3].color.a = 1f;
             }
             this.staff[4].color.a -= 0.02f;
             if ((double)this.staff[4].color.a <= 0.0)
             {
                 this.staff[4].color.a = 0.0f;
             }
             this.staff[5].color.a += 0.01f;
             if ((double)this.staff[5].color.a >= 1.0)
             {
                 this.staff[5].color.a = 1f;
             }
         }
         else if (this.time > 4750 && this.time <= 4800)
         {
             this.staff[5].color.a -= 0.05f;
             if ((double)this.staff[5].color.a <= 0.0)
             {
                 this.staff[5].color.a = 0.0f;
             }
             for (int index = 0; index < 4; ++index)
             {
                 this.background[index].color.a -= 0.02f;
             }
             this.black.position.X += (float)((-200.0 - (double)this.black.position.X) / 15.0);
         }
         else if (this.time > 4800 && this.time <= 5220)
         {
             this.background2[0].color.a += 0.02f;
             if ((double)this.background2[0].color.a >= 1.0)
             {
                 this.background2[0].color.a = 1f;
             }
             this.background2[0].position.X += 0.1f;
             this.background2[0].position.Y  = 230f;
             this.background2[0].scale       = new Vector2(0.8f, 0.8f);
             this.staff2[0].color.a         += 0.01f;
             if ((double)this.staff2[0].color.a >= 1.0)
             {
                 this.staff2[0].color.a = 1f;
             }
         }
         else if (this.time > 5220 && this.time <= 5640)
         {
             this.background2[0].position.X += 0.1f;
             this.staff2[0].color.a         -= 0.02f;
             if ((double)this.staff2[0].color.a <= 0.0)
             {
                 this.staff2[0].color.a = 0.0f;
             }
             this.staff2[1].color.a += 0.01f;
             if ((double)this.staff2[1].color.a >= 1.0)
             {
                 this.staff2[1].color.a = 1f;
             }
         }
         else if (this.time > 5640 && this.time <= 6060)
         {
             this.background2[0].position.X += 0.1f;
             this.staff2[1].color.a         -= 0.02f;
             if ((double)this.staff2[1].color.a <= 0.0)
             {
                 this.staff2[1].color.a = 0.0f;
             }
             this.staff2[2].color.a += 0.01f;
             if ((double)this.staff2[2].color.a >= 1.0)
             {
                 this.staff2[2].color.a = 1f;
             }
         }
         else if (this.time > 6060 && this.time <= 6480)
         {
             this.background2[0].position.X += 0.1f;
             this.staff2[2].color.a         -= 0.02f;
             if ((double)this.staff2[2].color.a <= 0.0)
             {
                 this.staff2[2].color.a = 0.0f;
             }
             this.staff2[3].color.a += 0.01f;
             if ((double)this.staff2[3].color.a >= 1.0)
             {
                 this.staff2[3].color.a = 1f;
             }
         }
         if (this.time > 6450 && this.time <= 6500)
         {
             this.whitecolor2 += 0.02f;
         }
         else if (this.time == 6501)
         {
             for (int index = 0; index < 4; ++index)
             {
                 this.textcolor[index] = 0.0f;
             }
             this.background2[0].color.a = 0.0f;
             this.staff2[3].color.a      = 0.0f;
             this.black.color.a          = 0.0f;
             this.whitecolor2            = 0.0f;
             this.background2[1].scale   = new Vector2(1.3f, 1.3f);
         }
         else if (this.time > 6500 && this.time <= 6520)
         {
             this.background2[1].scale   += new Vector2((float)((0.699999988079071 - (double)this.background2[1].scale.X) / 15.0), (float)((0.699999988079071 - (double)this.background2[1].scale.Y) / 15.0));
             this.background2[1].color.a += 0.05f;
         }
         else if (this.time > 6520 && this.time <= 6920)
         {
             this.background2[1].scale -= new Vector2(0.0006f, 0.0006f);
             if (this.time > 6720)
             {
                 this.thanks.color.a += 0.05f;
                 if ((double)this.thanks.color.a >= 1.0)
                 {
                     this.thanks.color.a = 1f;
                 }
             }
         }
         else if (this.time > 6920 && this.time <= 6970)
         {
             this.background2[1].scale -= new Vector2(0.0006f, 0.0006f);
             this.whitecolor           -= 0.05f;
             if ((double)this.whitecolor <= 0.0)
             {
                 this.whitecolor = 0.0f;
             }
             this.background2[1].color.a -= 0.05f;
             if ((double)this.background2[1].color.a <= 0.0)
             {
                 this.background2[1].color.a = 0.0f;
             }
             this.thanks.color.a -= 0.1f;
             if ((double)this.thanks.color.a <= 0.0)
             {
                 this.thanks.color.a = 0.0f;
             }
             this.next.color.a += 0.02f;
         }
         else if (this.time >= 7120 && this.time <= 7140)
         {
             this.next.color.a -= 0.05f;
         }
         else if (this.time == 7141 && this.edtype != 4)
         {
             if (this.edtype == 1)
             {
                 ++this.record.Playdata.players[(int)(Main.Character - 1)].cleartime;
                 PracticeData data = this.LoadPracticeData();
                 data.clear[(int)(Main.Character - 1)] = true;
                 this.SavePracticeData(data);
                 Program.game.achivmanager.Check(AchievementType.Normal, 3, new Hashtable()
                 {
                     [(object)"practice"] = (object)data
                 });
                 Program.game.achivmanager.Check(AchievementType.Normal, 4, new Hashtable()
                 {
                     [(object)"playdata"] = (object)this.record.Playdata
                 });
                 Program.game.achivmanager.Check(AchievementType.Normal, 5, new Hashtable()
                 {
                     [(object)"practice"] = (object)data
                 });
             }
         }
         else if (this.time > 7141 && this.edtype != 4 && !this.record.Ok)
         {
             this.record.Update();
             if (this.record.Ok)
             {
                 this.SavePlayData(this.record.Playdata);
             }
         }
         else if (this.time > 7141 && this.edtype != 4 && !this.replay.Ok)
         {
             this.replay.Update();
         }
         else if (this.time > 7141)
         {
             BGM.Disposes();
             Program.game.StopSound("Result bank");
             Main.stage    = "ENTRANCE";
             this.Finished = true;
         }
         if (this.edtype == 4 && (Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
         {
             BGM.Disposes();
             Program.game.StopSound("Result bank");
             Main.stage    = "ENTRANCE";
             this.Finished = true;
         }
         if (this.praticle1 != null)
         {
             this.praticle1.Update();
         }
     }
     else
     {
         this.ContinueUpdate();
     }
     ++this.time;
 }
Example #8
0
 public void Update()
 {
     if (this.time < 22)
     {
         this.blackalpha += 0.03f;
         if ((double)this.blackalpha >= 0.600000023841858)
         {
             this.blackalpha = 0.6f;
         }
         this.playdata.color.a += 0.05f;
         if ((double)this.playdata.color.a >= 1.0)
         {
             this.playdata.color.a = 1f;
         }
         this.crapwise.color.a += 0.05f;
         if ((double)this.crapwise.color.a >= 1.0)
         {
             this.crapwise.color.a = 1f;
         }
         this.leveldata.color.a += 0.05f;
         if ((double)this.leveldata.color.a >= 1.0)
         {
             this.leveldata.color.a = 1f;
         }
         this.playerdata.color.a += 0.05f;
         if ((double)this.playerdata.color.a >= 1.0)
         {
             this.playerdata.color.a = 1f;
         }
     }
     else if (this.time == 22)
     {
         PracticeData practiceData = this.LoadPracticeData();
         Hashtable    data1        = new Hashtable();
         data1[(object)"ok"] = (object)false;
         for (int index = 0; index < 4; ++index)
         {
             if (this.pdata.players[index].cleartime > 0)
             {
                 data1[(object)"ok"] = (object)true;
                 break;
             }
         }
         Program.game.achivmanager.Check(AchievementType.Normal, 2, data1);
         Program.game.achivmanager.Check(AchievementType.Normal, 3, new Hashtable()
         {
             [(object)"practice"] = (object)practiceData
         });
         Program.game.achivmanager.Check(AchievementType.Normal, 5, new Hashtable()
         {
             [(object)"practice"] = (object)practiceData
         });
         Hashtable data2 = new Hashtable();
         data2[(object)"playdata"] = (object)this.pdata;
         Program.game.achivmanager.Check(AchievementType.Challenge, 14, data2);
         Program.game.achivmanager.Check(AchievementType.Hidden, 0, data2);
         Program.game.achivmanager.Check(AchievementType.Hidden, 5, new Hashtable()
         {
             [(object)"playerdata"] = (object)this.pdata.players
         });
     }
     if (this.time >= 22 && this.time < 32)
     {
         this.worda += 0.1f;
         if ((double)this.worda >= 1.0)
         {
             this.worda = 1f;
         }
     }
     if (!this.fadeout && this.time >= 32)
     {
         if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat) ? 1 : 0))) != 0)
         {
             Program.game.entrance.PlaySound("select");
             --this.player;
             if (this.player < 0)
             {
                 this.player = 3;
             }
         }
         else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat) ? 1 : 0))) != 0)
         {
             Program.game.entrance.PlaySound("select");
             ++this.player;
             if (this.player > 3)
             {
                 this.player = 0;
             }
         }
         else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat) ? 1 : 0))) != 0)
         {
             Program.game.entrance.PlaySound("select");
             --this.level;
             if (this.level < 0)
             {
                 this.level = 4;
             }
         }
         else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat) ? 1 : 0))) != 0)
         {
             Program.game.entrance.PlaySound("select");
             ++this.level;
             if (this.level > 4)
             {
                 this.level = 0;
             }
         }
         if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
         {
             Program.game.entrance.PlaySound("select");
             if (!this.showsc)
             {
                 this.showsc = true;
             }
             else if (this.scpage < this.pdata.players[this.player].sc[this.level].Count / 10)
             {
                 ++this.scpage;
             }
             else
             {
                 this.scpage = 0;
                 this.showsc = false;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
         {
             Program.game.entrance.PlaySound("cancel");
             this.fadeout = true;
         }
     }
     if (this.fadeout)
     {
         this.worda -= 0.1f;
         if ((double)this.worda <= 0.0)
         {
             this.worda = 0.0f;
         }
         this.blackalpha -= 0.03f;
         if ((double)this.blackalpha <= 0.0)
         {
             this.blackalpha = 0.0f;
         }
         this.playdata.color.a -= 0.05f;
         if ((double)this.playdata.color.a <= 0.0)
         {
             this.playdata.color.a = 0.0f;
         }
         this.crapwise.color.a -= 0.05f;
         if ((double)this.crapwise.color.a <= 0.0)
         {
             this.crapwise.color.a = 0.0f;
         }
         this.leveldata.color.a -= 0.05f;
         if ((double)this.leveldata.color.a <= 0.0)
         {
             this.leveldata.color.a = 0.0f;
         }
         this.playerdata.color.a -= 0.05f;
         if ((double)this.playerdata.color.a <= 0.0)
         {
             this.playerdata.color.a = 0.0f;
         }
     }
     ++this.time;
 }