public void Update( Boss b, EnemyManager em, Cname t, int id_i, int l, Vector2 pos, bool Ban) { this.player = pos; if (id_i != this.id || l != this.level) { this.Reinit(); } this.level = l; this.id = id_i; switch (t) { case Cname.REIMU: if (this.id == 0) { this.H_AMULET(l, pos, Ban); break; } break; case Cname.MARISA: if (this.id == 0) { this.D_TORPEDO(l, pos, Ban); break; } break; case Cname.SANAE: if (this.id == 0) { this.S_BOMB(l, pos, Ban); break; } break; default: if (this.id == 0) { this.EM_BLAST(b, em, l, pos, Ban); break; } break; } if (!Ban && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm))) { EquipShoot.CEquipShoot(this.tex, t, this.id, pos, this.sprites); } this.time += Time.Stop; }
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()); } }
public SingleBomb(Cname type_C, Vector2 pos) { this.type = type_C; if (this.type != Cname.SANAE) { Program.game.game.PlaySound("nep00", true, pos.X); this.cs = Program.game.game.PlayEffect(false, ((int)(14 + this.type)).ToString(), new Vector2(pos.X, pos.Y)); this.cs.BanSound(true); this.cs.effect = true; this.cs.clearb = true; this.cs.bomb = true; } switch (this.type) { case Cname.REIMU: this.tex = new Sprite(); this.target = new Character(this.tex); this.cs.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)0, (byte)1, (byte)2, (byte)3, (byte)10, (byte)11, (byte)17, (byte)17, (byte)17, (byte)17, (byte)17, (byte)17 }); break; case Cname.MARISA: Program.game.game.Quake((int)((double)this.cs.time.total * 0.949999988079071), 2); this.cs.SetOPos(new Vector2(pos.X, pos.Y)); this.cs.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)2, (byte)30 }); break; case Cname.SANAE: if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)) { this.cs = Program.game.game.PlayEffect(false, "19", new Vector2(pos.X, pos.Y)); this.cs.SetOPos(pos); } else { Program.game.game.PlaySound("nep00", true, pos.X); Program.game.game.Quake(250, 2); this.cs = Program.game.game.PlayEffect(false, ((int)(14 + this.type)).ToString(), new Vector2(pos.X, pos.Y)); this.cs.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)0, (byte)125 }); this.cs.clearb = true; } this.cs.BanSound(true); this.cs.effect = true; this.cs.bomb = true; break; case Cname.PATCHOULI: Program.game.game.Quake((int)((double)this.cs.time.total * 0.949999988079071), 2); this.cs.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)2, (byte)3, (byte)9, (byte)9 }); break; } this.time = 0; }
public void ContinueUpdate() { if (this.time > 20 && this.time < 40) { this.dialogbg.color.a += 0.05f; } else { if (this.time < 140) { return; } if (!this.dialogfinish) { this.time = 140; for (int index = 0; index < this.dialog.Length; ++index) { if (index == this.dialogt) { this.dialog[index].color.a += 0.05f; if ((double)this.dialog[index].color.a >= 1.0) { this.dialog[index].color.a = 1f; } } else { this.dialog[index].color.a -= 0.05f; if ((double)this.dialog[index].color.a <= 0.0) { this.dialog[index].color.a = 0.0f; } } } ++this.dialogtime; if (this.dialogtime < 60 || !(Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard) && !(Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard) && !PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { return; } ++this.dialogt; if (this.dialogt > this.dialog.Length - 1) { this.dialogfinish = true; } this.dialogtime = 0; } else if (this.time > 140 && this.time <= 160) { for (int index = 0; index < this.dialog.Length; ++index) { this.dialog[index].color.a -= 0.05f; if ((double)this.dialog[index].color.a <= 0.0) { this.dialog[index].color.a = 0.0f; } } this.dialogbg.color.a -= 0.05f; } else if (this.time > 160 && !this.record.Ok) { this.record.Update(); if (this.record.Ok) { this.SavePlayData(this.record.Playdata); } this.time = 161; } else if (this.time > 160 && this.time <= 180) { this.tip.color.a += 0.05f; } else if (this.time > 270 && this.time <= 290) { this.tip.color.a -= 0.05f; } else { if (this.time <= 290) { return; } BGM.Disposes(); Program.game.StopSound("Result bank"); Main.stage = "ENTRANCE"; this.Finished = true; } } }
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; }
public void Update(ItemManager im, ItemTipManager itm, Vector2 ppos, bool ban, bool auto) { if (Main.IsYDownOut(this.pos.Y)) { this.die = true; } if (!this.die && !ban && ppos != Vector2.Zero) { if (this.type == ItemType.Green && this.time >= 50) { this.ok = true; } if ((double)ppos.Y <= (double)Main.gn.Itemline[(int)(Main.Character - 1)] || auto) { this.ok = true; this.max = true; } if (((double)this.pos.X - (double)ppos.X) * ((double)this.pos.X - (double)ppos.X) + ((double)this.pos.Y - (double)ppos.Y) * ((double)this.pos.Y - (double)ppos.Y) <= (double)(Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow) ? 3600 : 900)) { this.ok = true; } if (this.ok) { if (!this.ok) { this.pos.X += (float)(5.0 * Math.Cos((double)Main.Twopointangle(ppos.X, ppos.Y, this.pos.X, this.pos.Y))) * Time.Stop; this.pos.Y += (float)(5.0 * Math.Sin((double)Main.Twopointangle(ppos.X, ppos.Y, this.pos.X, this.pos.Y))) * Time.Stop; } else { this.pos.X += (float)(10.0 * Math.Cos((double)Main.Twopointangle(ppos.X, ppos.Y, this.pos.X, this.pos.Y))) * Time.Stop; this.pos.Y += (float)(10.0 * Math.Sin((double)Main.Twopointangle(ppos.X, ppos.Y, this.pos.X, this.pos.Y))) * Time.Stop; } if (Math.Abs((int)this.pos.X - (int)ppos.X) <= 4 && Math.Abs((int)this.pos.Y - (int)ppos.Y) <= 4) { Program.game.game.PlaySound("item", true, ppos.X); switch (this.type) { case ItemType.BigBlue: int num1 = (double)ppos.Y < (double)Main.gn.Itemline[(int)(Main.Character - 1)] || this.max ? 20000 + Program.game.game.MaxBlue : 50 * (545 - (int)ppos.Y) + Program.game.game.MaxBlue; int score_i1 = num1 - num1 % 10; Program.game.game.Score += (long)score_i1; ItemTip itemTip1 = new ItemTip(itm, this.pos, score_i1, (double)ppos.Y >= (double)Main.gn.Itemline[(int)(Main.Character - 1)] & !this.max); break; case ItemType.Blue: int num2 = (double)ppos.Y < (double)Main.gn.Itemline[(int)(Main.Character - 1)] || this.max ? 10000 + Program.game.game.MaxBlue : 25 * (545 - (int)ppos.Y) + Program.game.game.MaxBlue; int score_i2 = num2 - num2 % 10; Program.game.game.Score += (long)score_i2; ItemTip itemTip2 = new ItemTip(itm, this.pos, score_i2, (double)ppos.Y >= (double)Main.gn.Itemline[(int)(Main.Character - 1)] & !this.max); break; case ItemType.BigRed: Program.game.game.Score += 200000L; if (Program.game.game.Point < 200) { Program.game.game.Point += 20; if (Program.game.game.Point >= 200) { Program.game.game.Point = 200; ItemTip itemTip3 = new ItemTip(itm, this.pos, TipType.FullPower, false); } if (Program.game.game.Point % 50 == 0) { Program.game.game.PlaySound("powerup", true, ppos.X); break; } break; } break; case ItemType.Red: Program.game.game.Score += 10000L; if (Program.game.game.Point < 200) { ++Program.game.game.Point; if (Program.game.game.Point >= 200) { Program.game.game.Point = 200; ItemTip itemTip3 = new ItemTip(itm, this.pos, TipType.FullPower, false); } if (Program.game.game.Point % 50 == 0) { Program.game.game.PlaySound("powerup", true, ppos.X); break; } break; } break; case ItemType.Full: Program.game.game.Score += 2000000L; if (Program.game.game.Point < 200) { Program.game.game.PlaySound("powerup", true, ppos.X); } Program.game.game.Point = 200; ItemTip itemTip4 = new ItemTip(itm, this.pos, TipType.FullPower, false); break; case ItemType.BigUp: Program.game.game.Score += 1000000L; Program.game.game.Life += 5; Program.game.game.PlaySound("extend", true, ppos.X); break; case ItemType.Up: ++Program.game.game.Life; if (Program.game.game.Life % 5 == 0) { Program.game.game.Score += 1000000L; Program.game.game.PlaySound("extend", true, ppos.X); break; } break; case ItemType.BigBomb: Program.game.game.Bomb += 5; Program.game.game.PlaySound("cardget", true, ppos.X); break; case ItemType.Bomb: ++Program.game.game.Bomb; if (Program.game.game.Bomb % 5 == 0) { Program.game.game.PlaySound("cardget", true, ppos.X); break; } break; case ItemType.Green: Program.game.game.Score += 100L; Program.game.game.MaxBlue += 5; break; } this.die = true; } } } else { this.ok = false; } if ((double)this.speed.Y <= 0.0) { this.rotate += 1f * Time.Stop; } else { this.rotate = 0.0f; } if ((double)this.speed.Y < 1.5) { this.speed.Y += 0.07f; } else { this.speed.X -= 0.01f; if ((double)this.speed.X <= 0.0) { this.speed.X = 0.0f; } } this.pos.X += this.speed.X * Time.Stop; this.pos.Y += this.speed.Y * Time.Stop; if ((double)this.pos.Y >= 500.0) { this.die = true; } ++this.time; }
public void Update(CSManager csm, EnemyManager e, Boss b) { praticle.posrect = new Vector4(body.position.X, body.position.Y, 0.0f, 0.0f); equip.Update(b, e, type, mattribute.CHILDREN, eqlevel, body.position, Dis | Ban | BanShoot); SelfBarrageManager.Update(e, b, this); ++f; if (f % 3 == 0) { if (flash <= 40) { ++flash; } if (flash % 2 == 0) { body.color.r = 0.0f; body.color.g = 0.0f; } else { body.color.r = 1f; body.color.g = 1f; } } if (f == 6) { f = 0; ++ani; if (ani == 7) { ani = 0; } } eqlevel = Program.game.game.Point / 50; runtime += Time.Stop; if (body.position.X >= rangex.X && body.position.X <= rangex.Y && (body.position.Y >= rangey.X && body.position.Y <= rangey.Y)) { int num1 = -1; if (!Dis) { if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up)) { num1 = -90; change = false; } if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down)) { num1 = 90; change = false; } if (Main.IsKeyDown(Keys.Left) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Left)) { num1 = 180; if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up)) { num1 = 225; } if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down)) { num1 = 135; } } if (Main.IsKeyDown(Keys.Right) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Right)) { num1 = 0; if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up)) { num1 = -45; } if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down)) { num1 = 45; } } } if (num1 != -1) { if (runtime - runtimebf >= 1.0) { if (num1 == 225 || num1 == 135 || (num1 == 180 || num1 == 0) || (num1 == -45 || num1 == 45)) { ansave = num1; change = true; f3 = 1; ++f2; if (f2 == 3) { switch (num1) { case -45: case 0: case 45: body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60); break; case 135: case 180: case 225: body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60); break; } } else if (f2 == 7) { ++ani2; if (ani2 >= 4) { ani2 = 1; } switch (num1) { case -45: case 0: case 45: body.rect = new Rectangle((11 + ani2) * 60, (int)(type - 1) * 60, 60, 60); break; case 135: case 180: case 225: body.rect = new Rectangle((7 + ani2) * 60, (int)(type - 1) * 60, 60, 60); break; } f2 = 4; } } else { change = false; } } float num2; if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)) { num2 = Characters.attribute[(int)(type - 1 + 4)].MOVE * 0.5f * speedadd.X; shifted = true; } else { num2 = (float)(1.0 + Characters.attribute[(int)(type - 1)].MOVE * 0.5 * speedadd.Y); } body.position.X = MathHelper.Clamp(body.position.X + num2 * (float)Math.Cos(num1 * Math.PI / 180.0) * Time.Stop, rangex.X, rangex.Y); body.position.Y = MathHelper.Clamp(body.position.Y + num2 * (float)Math.Sin(num1 * Math.PI / 180.0) * Time.Stop, rangey.X, rangey.Y); } else { change = false; f2 = 0; ani2 = 0; } if (runtime - runtimebf >= 1.0) { if (!change && f3 == 0) { body.rect = new Rectangle(ani * 60, (int)(type - 1) * 60, 60, 60); } else if (!change && f3 >= 1) { if (ansave == 225 || ansave == 135 || ansave == 180) { body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60); } else if (ansave == 0 || ansave == -45 || ansave == 45) { body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60); } ++f3; if (f3 == 4) { f3 = 0; } } runtimebf = runtime; } Program.game.achivmanager.Check(AchievementType.Hidden, 3, new Hashtable() { ["itemline"] = Main.gn.Itemline[(int)(Main.Character - 1)], ["y"] = body.position.Y }); } if ((Dis || free) && Time.Stop == 1.0) { ++time; if (time > 30 && time <= 100) { for (int index = 0; index < e.EnemyArray.Count; ++index) { if (!e.EnemyArray[index].IsInWudi() && !e.EnemyArray[index].die && (e.EnemyArray[index].hp > 0 && !Main.IsOut(e.EnemyArray[index].Position)) && Math.Sqrt((e.EnemyArray[index].Position.X - body.position.X) * (e.EnemyArray[index].Position.X - body.position.X) + (e.EnemyArray[index].Position.Y - body.position.Y) * (e.EnemyArray[index].Position.Y - body.position.Y)) < Math.Abs((time - 10) * 10)) { e.EnemyArray[index].deadkill = true; e.EnemyArray[index].hp -= 2; } } } if (time == 1) { Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable() { ["missorjust"] = true }); CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "14", new Vector2(body.position.X + 93f, body.position.Y - 13f)); crazyStorm.BanSound(true); crazyStorm.effect = true; Program.game.game.PlaySound("pldead00", true, body.position.X); body.color.a = 0.0f; } else if (time == 30) { if (Program.game.game.Point >= 50) { Program.game.game.DeathItem(); } Program.game.game.SpecialSystemReset(); dead = true; havedead = true; Program.game.game.Life -= 5; if (Program.game.game.Bomb < 10) { Program.game.game.Bomb = 10 + Program.game.game.Bomb % 5; } if (Program.game.game.Life == 0) { Program.game.game.Life = 0; if (!makeup) { Program.game.game.Point = 150; } makeup = true; } else if (Program.game.game.Life < 0) { alreadycal = true; Program.game.game.PlaySound("pldead01", true, body.position.X); Program.game.game.Life = -5; Program.game.game.Bomb = 0; Program.game.game.BanPause = true; makeup = false; } } else if (time > 30) { if (time == 31) { body.position.X = 224f; body.position.Y = 510f; } else if (Program.game.game.Life >= 0 && body.position.Y > 420.0 && !free) { body.position.Y -= 2f; if (body.position.Y <= 420.0) { body.position.Y = 420f; } } if (Program.game.game.Life >= 0) { if (time % 6 < 3) { body.color.r = 0.0f; body.color.g = 0.0f; } else { body.color.r = 1f; body.color.g = 1f; } } body.color.a = 1f; } if (time == 95) { if (!alreadycal) { Program.game.game.AddStgData(1, 0, 0); } else { alreadycal = false; } Dis = false; free = true; if (Program.game.game.Life == -5) { free = false; Dis = true; time = 50; Program.game.game.DeathProcess(); } } if (time > 280) { free = false; time = 0; } } if (!Ban && !Dis && !BanShoot | type == Cname.PATCHOULI && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm))) { BEquipShoot(selfb, type, mattribute.BODY, body.position); shot = true; } if (bomb != null && !bomb.Die) { bomb.Update(this, csm, e, b); } else if (bomb != null) { bomb = null; Wudi = false; Auto = false; } int num = type != Cname.SANAE || Main.Mode != Modes.SINGLE || (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift)) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow) ? 5 : 3; if (!Ban && (jue <= 10 || free) && (Program.game.game.Bomb >= num && bomb == null) && ((Main.IsKeyPressed(Keys.X) || !Main.Replay && PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat)) && Time.Stop != 0.0)) { bombed = true; BanShoot = true; body.color = new Colors(1f, 1f, 1f, 1f); if (b != null) { Program.game.game.AddStgData(0, 1, 0); } Program.game.game.Bomb -= num; if (Program.game.game.Bomb <= 0) { Program.game.game.Bomb = 0; } if (!free) { Dis = false; time = 0; Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable() { ["missorjust"] = false }); } Program.game.game.PlaySound("slash", true, body.position.X); bomb = new SingleBomb(type, body.position + new Vector2(93f, -13f)); Wudi = true; Auto = true; } if (Dis || free) { ++jue; } else { jue = 0; } if (itemm == null) { return; } foreach (ItemManager itemManager in itemm) { if (!Dis) { itemManager.Ban(false); } else { itemManager.Ban(true); } itemManager.Transpos(body.position.X, body.position.Y); } }
public unsafe void Update() { if (time >= 0 && time <= 22) { displaybox.position.X = ((displaybox.position.X * 9.0f + 88.0f) / 10.0f); displaybox.color.a += 0.05f; if (displaybox.color.a >= 1.0) { displaybox.color.a = 1f; } level[selection - 1].color.a += 0.05f; if (level[selection - 1].color.a >= 1.0) { level[selection - 1].color.a = 1f; } for (int index = 0; index < 5; ++index) { if (time == 1) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } if (index != selection - 1) { level[index].color.a -= 0.05f; if (level[index].color.a <= 0.0) { level[index].color.a = 0.0f; } } } if (time == 1) { fixed(float *v = &crapwise.color.a) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR); } } if (time == 11) { crapwisexy[0] = new Vector2(366f, 242f); crapwisexy[1] = new Vector2(52f, 242f); fixed(float *v = &crapwise.color.a) { ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR); } } if (!steps) { for (int index = 0; index < 4; ++index) { character[index].color.a -= 0.05f; if (character[index].color.a <= 0.0) { character[index].color.a = 0.0f; } } } } if (!fadeout & !steps) { if (((!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"); --selection; if (selection == 0) { selection = 4; } for (int index = 0; index < 5; ++index) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } time = 0; } else if (((!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"); ++selection; if (selection == 5) { selection = 1; } for (int index = 0; index < 5; ++index) { if (index != selection - 1) { level[index].color.a -= 0.05f; if (level[index].color.a <= 0.0) { level[selection - 1].color.a = 0.0f; } } } for (int index = 0; index < 5; ++index) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } time = 0; } if (time >= 22) { if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { Program.game.entrance.PlaySound("ok"); // Main.Level=(Difficulty)selection; Main.Level = Difficulty.LUNATIC; time2 = 0; steps = true; } 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))) { for (int index = 0; index < 5; ++index) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (30 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } Program.game.entrance.PlaySound("cancel"); fadeout = true; } } } if (!steps) { if (time <= 72) { displaybox.color.a -= 0.01f; if (displaybox.color.a <= 0.0) { displaybox.color.a = 0.0f; } } if (time >= 72 & time <= 122) { displaybox.color.a += 0.01f; if (displaybox.color.a >= 1.0) { displaybox.color.a = 1f; } } if (time >= 122) { time = 42; } } else { if (time2 > 0 & time2 <= 22) { displaybox.position.X = ((displaybox.position.X * 4.0f + 88.0f - 50.0f) / 5.0f); displaybox.color.a -= 0.05f; if (displaybox.color.a <= 0.0) { displaybox.color.a = 0.0f; } level[selection - 1].color.a -= 0.05f; if (level[selection - 1].color.a <= 0.0) { level[selection - 1].color.a = 0.0f; } for (int index = 0; index < 5; ++index) { if (time2 == 1) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (30 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } } if (time2 == 1) { fixed(float *v = &crapwise.color.a) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR); } fixed(float *v = &cinfo.color.a) { ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR); } fixed(float *v = &cinfo.position.X) { ValueEvent valueEvent = new ValueEvent(v, 20f, 10, ChangeType.NONLINEAR); } } if (time2 == 11) { crapwisexy[0] = new Vector2(600f, 242f); crapwisexy[1] = new Vector2(22f, 242f); fixed(float *v = &crapwise.color.a) { ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR); } } } if (time2 >= 23) { time2 = 23; } if (time2 >= 0 && !ok) { for (int index = 0; index < 4; ++index) { if (time2 == 0) { character[index].position.X = 200f; } if (index == selection2 - 1) { character[index].color.a += 0.05f; if (character[index].color.a >= 1.0) { character[index].color.a = 1f; } character[index].position.X += ((0.0f - character[index].position.X) / 10.0f); } else { character[index].color.a -= 0.05f; if (character[index].color.a <= 0.0) { character[index].color.a = 0.0f; } character[index].position.X += ((200.0f - character[index].position.X) / 10.0f); } } } if (time2 >= 22 && !steps2) { if (((!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"); --selection2; if (selection2 == 0) { selection2 = 4; } } else if (((!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"); ++selection2; if (selection2 == 5) { selection2 = 1; } } 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))) { for (int index = 0; index < 5; ++index) { fixed(float *v = &level[index].position.X) { ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR); } } fixed(float *v = &cinfo.color.a) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR); } fixed(float *v = &cinfo.position.X) { ValueEvent valueEvent = new ValueEvent(v, 100f, 10, ChangeType.NONLINEAR); } Program.game.entrance.PlaySound("cancel"); steps = false; time = 0; time2 = 0; Main.keyboardstat = Main.prekeyboard; } if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { Program.game.entrance.PlaySound("ok"); Main.Character = (Cname)selection2; // Main.Character=Cname.SANAE; steps2 = true; selection3 = 1; time3 = 0; blackpos.X = 249f; } } if (steps2) { if (time3 <= 20) { if (time3 == 0) { stage = practicedata.clearstate[selection2 - 1][selection - 1]; // stage=6; if (stage == 7) { selection3 = 7; } } fixed(float *v = &blackpos.X) { ValueEvent valueEvent = new ValueEvent(v, 199f, 10, ChangeType.NONLINEAR); } blacka += 0.035f; if (blacka >= 0.699999988079071) { blacka = 0.7f; } worda += 0.05f; } else if (!ok) { 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))) { time3 = 0; steps2 = false; fixed(float *v = &blacka) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &worda) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } Program.game.entrance.PlaySound("cancel"); } if ((Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) && stage != 7) { --selection3; if (selection3 < 1) { selection3 = stage; } Program.game.entrance.PlaySound("select"); } if ((Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) && stage != 7) { ++selection3; if (selection3 > stage) { selection3 = 1; } Program.game.entrance.PlaySound("select"); } if ((Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) && stage != 0) { Program.game.entrance.PlaySound("ok"); ok = true; fixed(float *v = &blacka) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &worda) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } } } ++time3; } } ++time; if (!steps) { return; } ++time2; }
private void EM_BLAST(Boss b, EnemyManager em, int l, Vector2 p, bool Ban) { if (this.ps != null && !this.ps.allpan && (double)this.ptime <= 30.0) { ++this.ptime; int num1 = int.Parse(this.ps.Id.Split('e')[1]) - 19; int power = 30 + num1 * 12; int num2 = 15 + (num1 - 1) * 5; foreach (Enemy enemy in em.EnemyArray) { if (!enemy.IsInWudi() && (double)Math.Abs(enemy.Position.X - p.X) <= (double)num2 && ((double)enemy.Position.Y >= 0.0 && (double)enemy.Position.Y <= (double)p.Y)) { enemy.hp -= power; Program.game.game.Score += 10L; } } if (b != null && (double)Math.Abs(b.Position.X - p.X) <= (double)num2 && ((double)b.Position.Y >= 0.0 && (double)b.Position.Y <= (double)p.Y)) { Program.game.game.Score += 10L; if (b.CardArray.Count >= 1) { b.CardArray[0].DeHp(power, this.ps.isforshoot); } } } else if (this.ps != null && this.ps.allpan && (double)this.ptime <= 10.0) { ++this.ptime; if ((double)this.ptime == 10.0) { this.ps.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)0, (byte)37 }); } } CrazyStorm effect = Program.game.game.FindEffect("e2"); if (effect != null) { this.time2 += Time.Stop; effect.SetPos(new Vector2(p.X + 93f, p.Y - 13f), true); if (Main.IsKeyUp(Keys.Z) && (Main.Replay || PadState.IsKeyUp(JOYKEYS.Confirm))) { Program.game.game.StopSound("ch"); if ((double)this.time2 >= 90.0 && l >= 1) { if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)) { this.ps = Program.game.game.PlayEffect(true, (2 + l).ToString(), new Vector2(p.X + 93f, p.Y - 13f)); this.ps.allpan = true; } else { this.ps = Program.game.game.PlayEffect(true, (19 + l).ToString(), new Vector2(p.X + 93f, p.Y - 13f)); } this.ptime = 0.0f; this.ps.isforshoot = true; this.ps.BanSound(true); this.ps.effect = true; this.ps.bomb = true; Program.game.game.PlaySound("slash", true, p.X); this.time2 = 0.0f; } effect.Break(); } if (Ban) { effect.Break(); } } else if (!Ban && l >= 1 && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm)) && effect == null) { this.time2 = 0.0f; CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "2", new Vector2(p.X + 93f, p.Y - 13f)); crazyStorm.isforshoot = true; crazyStorm.BanSound(true); crazyStorm.effect = true; crazyStorm.specialnotkill = true; crazyStorm.SetOPos(new Vector2(p.X + 93f, p.Y - 13f)); Program.game.game.PlaySound("ch", true, p.X); } if (!this.inited) { this.inited = true; for (int index = 0; index < l; ++index) { this.sprites.Add(new Sprite(this.tex, new Rectangle(59, 61, 41, 41))); this.sprites[this.sprites.Count - 1].origin = new Vector2(21f, 21f); this.sprites[this.sprites.Count - 1].scale = Vector2.Zero; this.sprites[this.sprites.Count - 1].color.a = 1f; } switch (l) { case 1: this.sprites[0].position = new Vector2(0.0f, -30f); break; case 2: this.sprites[0].position = new Vector2(-30f, 0.0f); this.sprites[1].position = new Vector2(30f, 0.0f); break; case 3: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(-30f, 0.0f); this.sprites[2].position = new Vector2(30f, 0.0f); break; case 4: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(0.0f, 30f); this.sprites[2].position = new Vector2(-30f, 0.0f); this.sprites[3].position = new Vector2(30f, 0.0f); break; } } for (int index = 0; index < this.sprites.Count; ++index) { this.sprites[index].scale += new Vector2(0.06f, 0.06f); if ((double)this.sprites[index].scale.X >= 0.800000011920929) { this.sprites[index].scale = new Vector2(0.8f, 0.8f); } this.sprites[index].rotation = 10f * (float)Math.Sin((double)this.time / 40.0 * Math.PI); } }
private void S_BOMB(int l, Vector2 p, bool Ban) { if (!this.inited) { this.inited = true; for (int index = 0; index < l; ++index) { this.sprites.Add(new Sprite(this.tex, new Rectangle(103, 61, 41, 41))); this.sprites[this.sprites.Count - 1].origin = new Vector2(20f, 21f); this.sprites[this.sprites.Count - 1].scale = Vector2.Zero; this.sprites[this.sprites.Count - 1].color.a = 1f; } switch (l) { case 1: this.sprites[0].position = new Vector2(0.0f, -30f); break; case 2: this.sprites[0].position = new Vector2(-30f, 0.0f); this.sprites[1].position = new Vector2(30f, 0.0f); break; case 3: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(-30f, 0.0f); this.sprites[2].position = new Vector2(30f, 0.0f); break; case 4: this.sprites[0].position = new Vector2(-22f, 10f); this.sprites[1].position = new Vector2(22f, 10f); this.sprites[2].position = new Vector2(-40f, 0.0f); this.sprites[3].position = new Vector2(40f, 0.0f); break; } } for (int index = 0; index < this.sprites.Count; ++index) { this.sprites[index].scale += new Vector2(0.06f, 0.06f); if ((double)this.sprites[index].scale.X >= 0.800000011920929) { this.sprites[index].scale = new Vector2(0.8f, 0.8f); } this.sprites[index].rotation += 10f * Time.Stop; } if ((double)Time.Stop == 1.0) { if (!Ban && (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow))) { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-17.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-11.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((17.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-11.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-20.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-10.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((20.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-10.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-12.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-25.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((12.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-26.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-5.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((26.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((-5.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } else { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-30.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((0.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((30.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-30.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((30.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-22.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((10.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((22.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((10.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-40.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((40.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((0.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } } foreach (SelfBarrage sb in SelfBarrageManager.SBArray) { if (sb.label == 1 && ((double)sb.time >= 60.0 || sb.Judged)) { Program.game.game.PlaySound("explo", true, sb.Position.X); CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "1", new Vector2(sb.Position.X + 93f, sb.Position.Y - 13f)); crazyStorm.isforshoot = true; crazyStorm.BanSound(true); crazyStorm.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)0, (byte)1 }); crazyStorm.effect = true; crazyStorm.allpan = true; crazyStorm.bomb = true; sb.Judged = true; sb.label = 0; } } }
private void D_TORPEDO(int l, Vector2 p, bool Ban) { if (!this.inited) { this.inited = true; for (int index = 0; index < l; ++index) { this.sprites.Add(new Sprite(this.tex, new Rectangle(146, 61, 41, 40))); this.sprites[this.sprites.Count - 1].origin = new Vector2(21f, 20f); this.sprites[this.sprites.Count - 1].scale = Vector2.Zero; this.sprites[this.sprites.Count - 1].color.a = 1f; } switch (l) { case 1: this.sprites[0].position = new Vector2(0.0f, -30f); break; case 2: this.sprites[0].position = new Vector2(-20f, 0.0f); this.sprites[1].position = new Vector2(20f, 0.0f); break; case 3: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(-20f, 0.0f); this.sprites[2].position = new Vector2(20f, 0.0f); break; case 4: this.sprites[0].position = new Vector2(-14f, -25f); this.sprites[1].position = new Vector2(14f, -25f); this.sprites[2].position = new Vector2(-30f, 0.0f); this.sprites[3].position = new Vector2(30f, 0.0f); break; } } for (int index = 0; index < this.sprites.Count; ++index) { this.sprites[index].scale += new Vector2(0.06f, 0.06f); if ((double)this.sprites[index].scale.X >= 0.5) { this.sprites[index].scale = new Vector2((float)(0.5 + 0.300000011920929 * (double)Math.Abs((float)Math.Sin((double)this.time / 40.0 * Math.PI))), (float)(0.5 + 0.300000011920929 * (double)Math.Abs((float)Math.Sin((double)this.time / 40.0 * Math.PI)))); } } if ((double)Time.Stop == 1.0) { if (!Ban && (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow))) { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-1.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((1.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-30.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-1.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-30.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((1.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-30.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-1.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((1.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-30.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-2.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-30.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((2.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((-30.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } else { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-20.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((0.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((20.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-20.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((20.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-14.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-25.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((14.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-30.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((30.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((0.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } } foreach (SelfBarrage sb in SelfBarrageManager.SBArray) { if (sb.label == 2 && Main.IsKeyUp(Keys.Z) && (Main.Replay || PadState.IsKeyUp(JOYKEYS.Confirm))) { sb.Judged = true; } else if (sb.label == 2 && sb.Judged) { sb.color.g -= 0.1f; sb.color.b -= 0.1f; if ((double)sb.color.g <= 0.0) { sb.color = new Colors(1f, 0.0f, 0.0f, 1f); } } } }
private void H_AMULET(int l, Vector2 p, bool Ban) { if (!this.inited) { this.inited = true; for (int index = 0; index < l; ++index) { this.sprites.Add(new Sprite(this.tex, new Rectangle(12, 63, 45, 41))); this.sprites[this.sprites.Count - 1].origin = new Vector2(23f, 21f); this.sprites[this.sprites.Count - 1].scale = Vector2.Zero; this.sprites[this.sprites.Count - 1].color.a = 1f; } switch (l) { case 1: this.sprites[0].position = new Vector2(0.0f, -30f); break; case 2: this.sprites[0].position = new Vector2(-30f, 0.0f); this.sprites[1].position = new Vector2(30f, 0.0f); break; case 3: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(-30f, 0.0f); this.sprites[2].position = new Vector2(30f, 0.0f); break; case 4: this.sprites[0].position = new Vector2(-20f, -25f); this.sprites[1].position = new Vector2(20f, -25f); this.sprites[2].position = new Vector2(-35f, 0.0f); this.sprites[3].position = new Vector2(35f, 0.0f); break; } } for (int index = 0; index < this.sprites.Count; ++index) { this.sprites[index].scale += new Vector2(0.06f, 0.06f); if ((double)this.sprites[index].scale.X >= 0.800000011920929) { this.sprites[index].scale = new Vector2(0.8f, 0.8f); } this.sprites[index].rotation -= 5f * Time.Stop; if ((double)this.sprites[index].rotation < 0.0) { this.sprites[index].rotation = 360f - this.sprites[index].rotation; } } if ((double)Time.Stop != 1.0) { return; } if (!Ban && (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow))) { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-5.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((5.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-30.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-10.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((10.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-25.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-15.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-25.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((15.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-5.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((-30.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((5.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((-30.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } else { switch (l) { case 1: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); break; case 2: this.sprites[0].position.X += (float)((-30.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((0.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((30.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); break; case 3: this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((-30.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((30.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); break; case 4: this.sprites[0].position.X += (float)((-20.0 - (double)this.sprites[0].position.X) / 5.0); this.sprites[0].position.Y += (float)((-25.0 - (double)this.sprites[0].position.Y) / 5.0); this.sprites[1].position.X += (float)((20.0 - (double)this.sprites[1].position.X) / 5.0); this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0); this.sprites[2].position.X += (float)((-35.0 - (double)this.sprites[2].position.X) / 5.0); this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0); this.sprites[3].position.X += (float)((35.0 - (double)this.sprites[3].position.X) / 5.0); this.sprites[3].position.Y += (float)((0.0 - (double)this.sprites[3].position.Y) / 5.0); break; } } }
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; }
protected override void Update(GameTime gameTime) { if (!Main.VSync) { Main.timewatch.Start(); } int posEx = Main.joyGetPosEx(0, ref Main.padinfo); this.Window.Title = Main.WindowTitle; if (this.IsActive) { Main.keyboardstat = Keyboard.GetState(); Main.padstat = PadState.GetState(posEx, Main.padinfo.dwXpos, Main.padinfo.dwYpos, Main.padinfo.dwButtons); } if (this.entrance != null) { this.entrance.Update(); if (this.entrance.Finished) { this.entrance = (Entrance)null; Main.gr = new GameResource(); } } if (this.game != null) { this.game.SUpdate(); if (this.game.Finished) { this.game = (Game)null; if (!Main.stage.Contains("PRACTICE") && !Main.stage.Contains("GAME")) { Main.gr = new GameResource(); } } } if (this.ed != null) { this.ed.Update(); if (this.ed.Finished) { this.ed = (ED)null; } } if (Main.stagecheck != Main.stage) { if (Main.stage == "ENTRANCE") { this.entrance = new Entrance(this.GraphicsDevice, Main.gr); } else if (Main.stage == "GAME") { this.game = new Game(this.GraphicsDevice, Main.gr); Main.MKeys = new bool[RecordManager.used.Length]; Main.preMKeys = new bool[RecordManager.used.Length]; } else if (Main.stage.Contains("GAME")) { this.game = new Game(this.GraphicsDevice, Main.gr, int.Parse(Main.stage.Split(' ')[1]), int.Parse(Main.stage.Split(' ')[2])); Main.MKeys = new bool[RecordManager.used.Length]; Main.preMKeys = new bool[RecordManager.used.Length]; } else if (Main.stage.Contains("PRACTICE")) { this.game = new Game(this.GraphicsDevice, Main.gr, int.Parse(Main.stage.Split(' ')[1])); Main.MKeys = new bool[RecordManager.used.Length]; Main.preMKeys = new bool[RecordManager.used.Length]; } else if (Main.stage.Contains("ED")) { this.ed = new ED((Main.ifcontinued ? 1 : 0) != 0, int.Parse(Main.stage.Split(' ')[1]), this.GraphicsDevice, Main.EDrecordsave, Main.EDreplaysave); } } Main.stagecheck = Main.stage; this.achivmanager.Update(); ValueEventManager.Update(); Music.Update(); Sound.Update(); Main.prekeyboard = Main.keyboardstat; Main.prepadstat = Main.padstat; if (this.game == null) { return; } this.game.PreReadSave(); }
public void Update(Texture2D bgmt, int stage) { ++this.time; if (this.now2 != -1 && !this.namestart) { bool flag = false; foreach (int num in Dialog.already) { if (this.now == num) { flag = true; break; } } if (!flag) { this.namestart = true; this.nameid = this.now; } } if (this.namestart && !this.close && !this.next) { ++this.nametime; if (this.nametime > 60 && this.nametime <= 80) { this.namecolor += 0.05f; } if (this.nametime > 220 && this.nametime <= 240) { this.namecolor -= 0.05f; } } else { this.namecolor -= 0.1f; if ((double)this.namecolor <= 0.0) { this.namecolor = 0.0f; } } if (!this.close && !this.next) { if (this.time <= 10) { this.start = false; this.tex.color.a += 0.1f; if ((double)this.tex.color.a >= 1.0) { this.tex.color.a = 1f; } this.dalpha += 0.1f; if ((double)this.dalpha >= 1.0) { this.dalpha = 1f; } if (this.now2 != -1) { this.db[this.now].color.a += 0.1f; if ((double)this.db[this.now].color.a >= 1.0) { this.db[this.now].color.a = 1f; } this.colorb += 0.1f; if ((double)this.colorb >= 1.0) { this.colorb = 1f; } this.colorm -= 0.1f; if ((double)this.colorm <= 0.5) { this.colorm = 0.5f; } } else { this.dm.color.a += 0.1f; if ((double)this.dm.color.a >= 1.0) { this.dm.color.a = 1f; } this.colorb -= 0.1f; if ((double)this.colorb <= 0.5) { this.colorb = 0.5f; } this.colorm += 0.1f; if ((double)this.colorm >= 1.0) { this.colorm = 1f; } } } if (this.time >= 11 && Main.IsKeyUp(Keys.Z) && (Main.Replay || PadState.IsKeyUp(JOYKEYS.Confirm)) && !this.start) { this.start = true; } else if (this.time >= 11 && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm)) && this.start) { Program.game.game.PlaySound("plst", false, 0.0f); this.time = 0; this.dalpha = 0.0f; this.n = this.sr.ReadLine(); if (this.n == "PAUSE") { this.next = true; this.start = false; } else if (this.n == "MUSIC") { BGM.Disposes(); if (stage != 7) { BGM bgm1 = new BGM(bgmt, 3 + (stage - 1) * 2); } else { BGM bgm2 = new BGM(bgmt, 16); } Music.BGM.Play(); this.n = this.sr.ReadLine(); if (this.n == null) { this.close = true; } else { this.Read(); } } else if (this.n == null) { this.close = true; } else { this.Read(); } } this.tex.position.Y += (float)((370.0 - (double)this.tex.position.Y) / 5.0); if (this.now2 == -1) { this.left.X += (float)((0.0 - (double)this.left.X) / 5.0); this.left.Y += (float)((62.0 - (double)this.left.Y) / 5.0); this.right.X += (float)((210.0 - (double)this.right.X) / 5.0); this.right.Y += (float)((92.0 - (double)this.right.Y) / 5.0); } else { this.left.X += (float)((-30.0 - (double)this.left.X) / 5.0); this.left.Y += (float)((92.0 - (double)this.left.Y) / 5.0); this.right.X += (float)((180.0 - (double)this.right.X) / 5.0); this.right.Y += (float)((62.0 - (double)this.right.Y) / 5.0); } } else if (this.time <= 10) { this.tex.color.a -= 0.1f; if ((double)this.tex.color.a <= 0.0) { this.tex.color.a = 0.0f; } this.tex.position.Y += (float)((380.0 - (double)this.tex.position.Y) / 5.0); this.left.X -= 4f; this.right.X += 4f; this.dm.color.a -= 0.1f; if ((double)this.dm.color.a <= 0.0) { this.dm.color.a = 0.0f; } for (int index = 0; index < this.db.Length; ++index) { if (this.db[index] != null) { this.db[index].color.a -= 0.1f; if ((double)this.db[index].color.a <= 0.0) { this.db[index].color.a = 0.0f; } } } } else { if (this.time < 11) { return; } for (int index = 0; index < this.db.Length; ++index) { if (this.db[index] != null) { --this.db[index].color.r; this.db[index].color.b = 1f; this.db[index].color.g = 1f; } } this.ok = true; if (this.namestart) { Dialog.already.Add(this.nameid); } this.tex.color.a = 0.0f; this.time = 11; if (!this.close) { return; } Program.game.game.Drawevents -= new Game.DrawDelegate(this.Draw); } }
public static bool IsKeyUp(JOYKEYS key) { return(!PadState.IsKeyDown(key)); }
public void Update() { this.worda += 0.1f; if ((double)this.worda >= 1.0) { this.worda = 1f; } if (this.step) { if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat)) { Program.game.PlaySound("select"); --this.selection2; if (this.selection2 < 0) { this.selection2 = 0; } } else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat)) { Program.game.PlaySound("select"); ++this.selection2; if (this.selection2 > this.kyboard.Length - 1) { this.selection2 = this.kyboard.Length - 1; } } else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.PlaySound("select"); if (this.selection2 - 13 >= 0) { this.selection2 -= 13; } else { this.selection2 = this.kyboard.Length - 1 - (12 - this.selection2); } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.PlaySound("select"); if (this.selection2 + 13 <= this.kyboard.Length - 1) { this.selection2 += 13; } else { this.selection2 = 12 - (this.kyboard.Length - 1 - this.selection2); } } else if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { if (this.selection2 <= 61 && this.nametemp.Length < 8) { Program.game.PlaySound("ok"); this.nametemp += this.kyboard[this.selection2]; this.playdata.players[(int)(Main.Character - 1)].ranks[(int)(Main.Level - 1)].data[this.selection].name = this.nametemp + "_"; } else if (this.selection2 == 62 && this.nametemp.Length < 8) { Program.game.PlaySound("ok"); this.nametemp += " "; this.playdata.players[(int)(Main.Character - 1)].ranks[(int)(Main.Level - 1)].data[this.selection].name = this.nametemp + "_"; } if (this.selection2 == 63) { this.BackSpace(); } else if (this.selection2 == 64) { this.Save(); } } else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat))) { this.BackSpace(); } } ++this.time; }
public unsafe void Update() { if (this.time < 22) { this.blackalpha += 0.03f; if ((double)this.blackalpha >= 0.600000023841858) { this.blackalpha = 0.6f; } } else if (this.time >= 22 && this.time < 32) { this.worda += 0.1f; if ((double)this.worda >= 1.0) { this.worda = 1f; } } if (!this.fadeout && !this.step && 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.page; if (this.page < 0) { this.page = 2; } } 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.page; if (this.page > 2) { this.page = 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.selection; if (this.selection < 0) { this.selection = 14; } } 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.selection; if (this.selection > 14) { this.selection = 0; } } else if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { if (this.rpys[this.page * 15 + this.selection] != null) { Program.game.entrance.PlaySound("ok"); this.step = true; this.time2 = 0; this.black2pos.X = 245f; this.vselection = 0; } } 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.step) { if (this.time2 <= 20) { if (this.time2 == 0) { int num = 0; this.stage = new List <int>(); this.stagescore = new List <long>(); for (int index = 0; index < 7; ++index) { this.stagescore.Add(0L); } foreach (ScoreRecord score in this.rms[this.page * 15 + this.selection].scores) { if ((int)score.stage != (int)(byte)num) { this.stage.Add((int)score.stage); num = (int)score.stage; } } Main.ReplayFirstStage = this.stage[0]; foreach (ScoreRecord score in this.rms[this.page * 15 + this.selection].scores) { if (score.type == (byte)10) { this.stagescore[(int)score.stage - 1] = score.score; } } this.selection2 = this.stage[this.vselection]; } this.black2pos.X += (float)((195.0 - (double)this.black2pos.X) / 10.0); this.black2alpha += 0.035f; if ((double)this.black2alpha >= 0.699999988079071) { this.black2alpha = 0.7f; } this.word2a += 0.05f; } else if (!this.ok) { 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))) { this.time2 = 0; this.stage = (List <int>)null; this.step = false; fixed(float *v = &this.black2alpha) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &this.word2a) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } Program.game.entrance.PlaySound("cancel"); } if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { --this.vselection; if (this.vselection < 0) { this.vselection = this.stage.Count - 1; } this.selection2 = this.stage[this.vselection]; Program.game.entrance.PlaySound("select"); } if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { ++this.vselection; if (this.vselection >= this.stage.Count) { this.vselection = 0; } this.selection2 = this.stage[this.vselection]; Program.game.entrance.PlaySound("select"); } if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { Program.game.entrance.PlaySound("ok"); this.ok = true; if (this.rpys[this.page * 15 + this.selection].Level == (byte)5) { this.spellcard = true; Main.Mode = Modes.SINGLE; Main.SpecialMode = Modes.SPELLCARD; this.bossstage = (int)this.rpys[this.page * 15 + this.selection].Mode; this.barrageid = (int)this.rpys[this.page * 15 + this.selection].SpecialMode; } else { Main.Mode = (Modes)this.rpys[this.page * 15 + this.selection].Mode; Main.SpecialMode = (Modes)this.rpys[this.page * 15 + this.selection].SpecialMode; Main.Level = (Difficulty)((int)this.rpys[this.page * 15 + this.selection].Level + 1); } Main.Character = (Cname)((int)this.rpys[this.page * 15 + this.selection].Chara + 1); Main.SetReplay(this.rms[this.page * 15 + this.selection]); Main.gameseed = this.seeds[this.page * 15 + this.selection]; fixed(float *v = &this.blackalpha) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &this.worda) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &this.black2alpha) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } fixed(float *v = &this.word2a) { ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR); } } } ++this.time2; } if (this.fadeout) { this.blackalpha -= 0.03f; if ((double)this.blackalpha <= 0.0) { this.blackalpha = 0.0f; } this.worda -= 0.1f; if ((double)this.worda <= 0.0) { this.worda = 0.0f; } } ++this.time; }
private static void H_AMULET(Texture2D s, Vector2 p, List <Sprite> sprt) { if ((double)EquipShoot.ctime < 7.0) { return; } for (int index = 0; index < sprt.Count; ++index) { SelfBarrage selfBarrage = new SelfBarrage(s, new Rectangle(22, 111, 13, 42), new Vector2(6f, 20f), sprt[index].position + p, 1f, new Vector2(1f, 1f)); selfBarrage.chase = true; selfBarrage.further = true; if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)) { selfBarrage.further = false; } selfBarrage.speed = 9f; selfBarrage.speedd = 270f; selfBarrage.power = 12; } EquipShoot.ctime = 0.0f; }
public void Update() { for (int index = 0; index < this.button.Length; ++index) { if (this.time >= index * 3 && this.time < 10 + index * 3) { this.button[index].color.a += 0.1f; this.button[index].position.X += 3f; this.buttonon[index].color.a += 0.1f; this.buttonon[index].position.X += 3f; } } if (!this.step && !this.fadeout && this.time >= 32) { if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.selection; if (this.cleared) { if (this.selection < 0) { this.selection = 3; } } else if (this.selection < 1) { this.selection = 3; } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.selection; if (this.cleared) { if (this.selection > 3) { this.selection = 0; } } else if (this.selection > 3) { this.selection = 1; } } 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("ok"); switch (this.selection) { case 0: this.fadeout = true; break; case 1: this.achivs = this.LoadAchievementList("Content/Data/9.xna"); this.step = true; break; case 2: this.step = true; break; case 3: this.fadeout = true; break; } } 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.selection = 3; } this.buttonon[this.selection].color.a = 1f; } if (this.step) { if ((double)this.ccolor > 0.0) { this.ccolor -= 0.05f; } for (int index = 0; index < 4; ++index) { if (index == this.cselection) { if ((double)this.character[index].color.a > 0.0) { this.character[index].color.a -= 0.05f; } } else { this.character[index].color.a = 0.0f; } } for (int index = 0; index < this.button.Length; ++index) { if (this.steptime >= index * 3 && this.steptime < 10 + index * 3) { this.button[index].color.a -= 0.1f; this.button[index].position.X -= 3f; this.buttonon[index].color.a -= 0.1f; this.buttonon[index].position.X -= 3f; } } if (this.selection == 2) { if (this.steptime == 0) { this.cselection = (int)(Main.Character - 1); } for (int index = 0; index < 4; ++index) { if (index == this.cselection) { if ((double)this.character[index].color.a < 1.0) { this.character[index].color.a += 0.1f; } } else { this.character[index].color.a = 0.0f; } } if ((double)this.wordalpha < 1.0) { this.wordalpha += 0.05f; } if (this.steptime >= 32) { if (!this.step2) { if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.selection2; if (this.selection2 < 0) { this.selection2 = 6; } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.selection2; if (this.selection2 > 6) { this.selection2 = 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("ok"); this.scname = this.LoadSpellCardList("Content/Data/7.xna"); bool flag = false; if (this.selection2 < 5) { for (int index1 = 0; index1 < this.prdata.clearstate.Length; ++index1) { for (int index2 = 0; index2 < this.prdata.clearstate[index1].Length - 1; ++index2) { if (this.prdata.clearstate[index1][index2] > this.selection2 + 1) { flag = true; break; } } } } else if (this.selection2 == 5) { for (int index = 0; index < this.prdata.clear.Length; ++index) { if (this.prdata.clear[index]) { flag = true; break; } } } if (this.selection2 == 6) { for (int index = 0; index < this.pdata.players.Length; ++index) { if (this.pdata.players[index].sc[4].Count >= (int)Main.SpellcardNum[4]) { flag = true; break; } } } if (flag) { this.selection3range = this.scname[this.selection2].Split('^').Length - 2; } else { this.selection3range = 0; } this.step2 = true; } 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.step = false; this.time = 0; this.steptime = 0; this.selection2 = 0; } } if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.cselection; if (this.cselection < 0) { this.cselection = 3; } } else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.cselection; if (this.cselection > 3) { this.cselection = 0; } } } if (this.step2) { if ((double)this.ccolor < 0.5) { this.ccolor += 0.1f; } ++this.step2time; if (this.step2time > 1 && !this.fadeout) { if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.selection3; if (this.selection3 < 0) { this.selection3 = this.selection3range; } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.selection3; if (this.selection3 > this.selection3range) { this.selection3 = 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)) { if (this.selection3range != 0) { Program.game.entrance.PlaySound("ok"); string[] strArray = this.scname[this.selection2].Split('^'); for (int index = 0; index < strArray.Length - 1; ++index) { if (this.selection3 == index) { this.scselection = strArray[index].Split(' ')[1] + " " + strArray[index].Split(' ')[2]; } } Main.Character = (Cname)(this.cselection + 1); this.fadeout = true; } } 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.step2 = false; this.step2time = 0; this.selection3 = 0; } } } } else if (this.selection == 1) { if ((double)this.wordalpha < 1.0) { this.wordalpha += 0.05f; } if (this.steptime >= 32) { if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.selection3; if (this.selection3 < 0) { this.selection3 = 2; } this.selection2 = 0; this.step2 = false; } else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.selection3; if (this.selection3 > 2) { this.selection3 = 0; } this.selection2 = 0; this.step2 = false; } if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); --this.selection2; if (this.selection2 < 0) { this.selection2 = this.achivs[this.selection3].Length - 1; } this.step2 = false; } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.entrance.PlaySound("select"); ++this.selection2; if (this.selection2 > this.achivs[this.selection3].Length - 1) { this.selection2 = 0; } this.step2 = false; } 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("ok"); this.step2 = !this.step2; } 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.step = false; this.step2 = false; this.steptime = 0; this.time = 0; this.selection2 = 0; this.selection3 = 0; } } } ++this.steptime; } else { if ((double)this.wordalpha > 0.0) { this.wordalpha -= 0.1f; } if ((double)this.character[this.cselection].color.a > 0.0) { this.character[this.cselection].color.a -= 0.1f; } } if (this.fadeout) { if (this.ftime >= 20) { for (int index = 0; index < 4; ++index) { this.character[index].position = new Vector2(200f, 0.0f); this.character[index].color.a = 0.0f; } } if (Main.SkiptoSCChanllenges) { Main.SkiptoSCChanllenges = false; } if (this.selection == 3) { for (int index = 0; index < this.button.Length; ++index) { if (this.ftime >= index * 3 && this.ftime < 10 + index * 3) { this.button[index].color.a -= 0.1f; this.button[index].position.X -= 3f; this.buttonon[index].color.a -= 0.1f; this.buttonon[index].position.X -= 3f; } } if (this.ftime >= 20) { this.finished = true; } } else if (this.selection == 2) { if ((double)this.wordalpha > 0.0) { this.wordalpha -= 0.1f; } this.black.color.a += 0.05f; if (this.ftime >= 20) { this.finished = true; } } else if (this.selection == 0) { this.black.color.a += 0.05f; if (this.ftime >= 20) { this.finished = true; } } ++this.ftime; } ++this.time; }
public void Update() { this.worda += 0.1f; if ((double)this.worda >= 1.0) { this.worda = 1f; } if (this.time > 10 && !this.ok && !this.step) { if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat)) { Program.game.PlaySound("select"); --this.page; if (this.page < 0) { this.page = 2; } } else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat)) { Program.game.PlaySound("select"); ++this.page; if (this.page > 2) { this.page = 0; } } else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.PlaySound("select"); --this.selection; if (this.selection < 0) { this.selection = 14; } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.PlaySound("select"); ++this.selection; if (this.selection > 14) { this.selection = 0; } } else if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { Program.game.PlaySound("ok"); if (this.rpys[this.page * 15 + this.selection] != null) { this.rpytemp = new RPYInfo(); this.rpytemp.SetVersion(Main.rpyversion); this.rpytemp.SetChara(this.rpys[this.page * 15 + this.selection].Chara); this.rpytemp.SetName(this.rpys[this.page * 15 + this.selection].Name); this.rpytemp.SetTime(this.rpys[this.page * 15 + this.selection].Time); this.rpytemp.SetLevel(this.rpys[this.page * 15 + this.selection].Level); this.rpytemp.SetScore(this.rpys[this.page * 15 + this.selection].Score); this.rpytemp.SetMode(this.rpys[this.page * 15 + this.selection].Mode); this.rpytemp.SetSpecialMode(this.rpys[this.page * 15 + this.selection].SpecialMode); } this.rpys[this.page * 15 + this.selection] = new RPYInfo(); this.rpys[this.page * 15 + this.selection].SetVersion(Main.rpyversion); this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_"); this.rpys[this.page * 15 + this.selection].SetScore(this.score); this.rpys[this.page * 15 + this.selection].SetMode((byte)Main.Mode); this.rpys[this.page * 15 + this.selection].SetSpecialMode((byte)Main.SpecialMode); this.rpys[this.page * 15 + this.selection].SetChara((byte)this.chara); this.rpys[this.page * 15 + this.selection].SetLevel((byte)this.level); if (this.spellcard) { this.rpys[this.page * 15 + this.selection].SetLevel((byte)5); this.rpys[this.page * 15 + this.selection].SetMode((byte)this.bossstage); this.rpys[this.page * 15 + this.selection].SetSpecialMode((byte)this.barrageid); } DateTime now = DateTime.Now; this.rpys[this.page * 15 + this.selection].SetTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second); this.step = true; this.selection2 = 64; if (this.nametemp == "") { this.selection2 = 0; } } 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.PlaySound("cancel"); this.ok = true; } } else if (this.time > 10 && !this.ok && this.step) { if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat)) { Program.game.PlaySound("select"); --this.selection2; if (this.selection2 < 0) { this.selection2 = 0; } } else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat)) { Program.game.PlaySound("select"); ++this.selection2; if (this.selection2 > this.kyboard.Length - 1) { this.selection2 = this.kyboard.Length - 1; } } else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) { Program.game.PlaySound("select"); if (this.selection2 - 13 >= 0) { this.selection2 -= 13; } else { this.selection2 = this.kyboard.Length - 1 - (12 - this.selection2); } } else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) { Program.game.PlaySound("select"); if (this.selection2 + 13 <= this.kyboard.Length - 1) { this.selection2 += 13; } else { this.selection2 = 12 - (this.kyboard.Length - 1 - this.selection2); } } else if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) { if (this.start) { if (this.selection2 <= 61 && this.nametemp.Length < 8) { Program.game.PlaySound("ok"); this.nametemp += this.kyboard[this.selection2]; this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_"); } else if (this.selection2 == 62 && this.nametemp.Length < 8) { Program.game.PlaySound("ok"); this.nametemp += " "; this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_"); } } this.start = true; if (this.selection2 == 63) { this.BackSpace(); } else if (this.selection2 == 64) { this.Save(); } } 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))) { this.BackSpace(); } } ++this.time; }