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); } }
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); } }
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); } } } }