public BossCard( Boss boss_i, Texture2D tex_t, CSManager csm, Hashtable barragec, Character Player_c, ItemManager itemm_i, int type_i, int stage_i, int barrageid_i, int totaltime_i, int maxhp_i) { this.boss = boss_i; this.Player = Player_c; this.tex = tex_t; this.totaltime = totaltime_i; this.realtime = this.totaltime; this.maxhp = maxhp_i; this.hp = this.maxhp; this.type = type_i; this.stage = stage_i; this.barrageid = barrageid_i; this.barrages = new List <BarrageSet>(); this.barrages.Add(new BarrageSet(csm.Createnew(this.stage, this.barrageid, barragec))); this.itemm = itemm_i; this.Player.dead = false; this.Player.shot = false; this.Player.bombed = false; this.Player.shifted = false; }
public BossCard AddNewCard( int type_i, CSManager csm, Hashtable barragec, Character Player, int stage, int barrageid_i, int totaltime_i, int maxhp_i) { BossCard bossCard = new BossCard(this, this.bosslist, csm, barragec, Player, this.itemm, type_i, stage, barrageid_i, totaltime_i, maxhp_i); this.CardArray.Add(bossCard); return(bossCard); }
public Enemy( List <float[]> enemyset_l, EnemyManager e, CSManager csm, Hashtable barragec, int type_i, Vector2 pos, float speed_f, float speedf_f, int life_i, int hp_i, int stage, int barrageid_i, int id_i) { this.enemyset = enemyset_l; this.type = type_i; this.InitType(this.type); this.Position = pos; this.speed = speed_f; this.speedf = speedf_f; this.life = life_i; this.hp = hp_i; this.ohp = this.hp; this.barrageid = barrageid_i; this.id = id_i; this.tex = e.tex; this.copy = new Enemy(); this.copy.type = this.type; this.copy.Position = new Vector2(this.Position.X, this.Position.Y); this.copy.speed = this.speed; this.copy.speedf = this.speedf; this.copy.life = this.life; this.copy.hp = this.hp; this.copy.barrageid = this.barrageid; this.copy.id = this.id; this.EventArray = new List <EnemyEvent>(); this.se = SpriteEffects.None; if (this.barrageid != -1) { this.barrage = csm.Createnew(stage, this.barrageid, barragec); } this.praticle = new Praticle(false, true, new Rectangle(49, 48, 14, 13), new Vector4(pos.X - 10f, pos.Y - 10f, 20f, 20f), new Vector2(7f, 7f), 1, 5, 30, 3f, -0.1f, new Vector2(0.0f, 360f), 10f); this.praticle.scale = new Vector4(1.2f, 0.5f, 0.0f, 0.0f); this.praticle.calpha = 1f; this.praticle.stop = true; e.EnemyArray.Add(this); }
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 void Update( EnemyManager e, CSManager csm, Character Player, BossBackground bg, Texture2D bgmt, int stage) { this.praticle.posrect = new Vector4(this.Position.X - 15f, this.Position.Y - 15f, 30f, 30f); this.praticle2.posrect = new Vector4(this.Position.X - 20f, this.Position.Y - 15f, 45f, 45f); this.praticle3.posrect = new Vector4(this.Position.X - 5f, this.Position.Y - 5f, 10f, 10f); this.praticle2.Update(); if (this.dialogm != null) { if (this.time >= 160) { this.dialogm.Update(bgmt, stage); } if (this.dialogm.ok) { this.wait = false; Program.game.game.BanShoot(false); } } if (bg != null && bg.Start) { Effects.SetforceParameters(this.force, this.time, (float)(((double)this.Position.X - 2.0) / 640.0), this.Position.Y / 480f); } else { Effects.SetforceParameters(this.force, this.time, (float)(((double)this.Position.X + 91.0) / 640.0), this.Position.Y / 480f); } if (this.time <= 120) { if (csm != null) { foreach (CrazyStorm crazyStorm in csm.csc) { foreach (Layer layer in crazyStorm.layerm.LayerArray) { foreach (Barrage barrage in layer.Barrages) { if (!barrage.Dis && barrage.time > 15 | !barrage.Mist && (!barrage.NeedDelete && !barrage.Invincible) && Math.Sqrt(((double)barrage.x - (double)this.Position.X) * ((double)barrage.x - (double)this.Position.X) + ((double)barrage.y - (double)this.Position.Y) * ((double)barrage.y - (double)this.Position.Y)) < (double)Math.Abs(this.time * 6)) { barrage.time = 1 + barrage.add + barrage.life; barrage.Dis = true; barrage.Blend = true; barrage.randf = 10f * (float)Main.rand.NextDouble(); } } } } } if (e != null) { for (int index = 0; index < e.EnemyArray.Count; ++index) { if (!e.EnemyArray[index].die && e.EnemyArray[index].hp > 0 && (!Main.IsOut(e.EnemyArray[index].Position) && Math.Sqrt(((double)e.EnemyArray[index].Position.X - (double)this.Position.X) * ((double)e.EnemyArray[index].Position.X - (double)this.Position.X) + ((double)e.EnemyArray[index].Position.Y - (double)this.Position.Y) * ((double)e.EnemyArray[index].Position.Y - (double)this.Position.Y)) < (double)Math.Abs(this.time * 6))) { e.EnemyArray[index].mana = true; e.EnemyArray[index].hp = 0; } } } this.position.X += (float)((224.0 - (double)this.Position.X) / 30.0); this.position.Y += (float)((170.0 - (double)this.Position.Y) / 30.0); if (Player != null) { Player.IAuto = true; } } else if (Player != null) { Player.IAuto = false; } ++this.time; this.SpecialUpdate(); this.sx = this.Position.X; if ((double)Math.Abs(this.sx - this.presx) >= 0.5 && !this.turned) { this.ns = 0; this.turned = true; this.back = false; } else if ((double)Math.Abs(this.sx - this.presx) < 0.5 && this.turned) { this.ns = (int)this.step.X - 1; this.turned = false; this.back = true; } if (this.time % 7 == 0) { if (this.turned) { this.ny = (double)this.sx <= (double)this.presx ? (int)this.step.Y - 1 : (int)this.step.Y; if (this.ny <= 0) { this.ny = 0; } } if (!this.back) { ++this.ns; if ((double)Math.Abs(this.sx - this.presx) >= 0.5 && (double)this.ns > (double)this.step.X) { this.ns = (int)this.step.X; } if ((double)Math.Abs(this.sx - this.presx) < 0.5 && (double)this.ns > (double)this.step.X) { this.ns = 0; } } else { --this.ns; if (this.ns < 0) { this.ns = 0; this.ny = 0; this.back = false; } } } this.presx = this.sx; this.cirrotate += 7; if (this.cirrotate >= 360) { this.cirrotate -= 360; } this.cirscale = (float)(1.5 + 0.200000002980232 * Math.Sin((double)this.time / Math.PI / 7.0)); if (!this.wait) { ++this.battletime; if (this.battletime == 120) { Hashtable data = new Hashtable(); data[(object)"reset"] = (object)null; Program.game.achivmanager.Check(AchievementType.Challenge, 12, data); Program.game.achivmanager.Check(AchievementType.Challenge, 13, data); } this.numalpha += 0.01666667f; if ((double)this.numalpha >= 1.0) { this.numalpha = 1f; } if (this.CardArray.Count >= 2) { this.CardArray[0].Update(this.CardArray[1].type, this.Position, bg, this.colortype); } else if (this.CardArray.Count >= 1) { this.CardArray[0].Update(this.CardArray[0].type, this.Position, bg, this.colortype); } if (this.CardArray.Count >= 1 && this.CardArray[0].die) { ++this.passedCards; if (this.CardArray[0].fdie) { this.CardArray.RemoveAt(0); this.CardArray[0].cf = true; } else { this.CardArray.RemoveAt(0); } if (this.CardArray.Count == 0) { if (this.letype != 3) { bg.Switch(false); Program.game.game.Quake(50, 5); this.praticle2.stop = true; this.praticle3.stop = false; Program.game.game.PlaySound("enep01", true, this.Position.X); } else { Program.game.game.PlaySound("tan", true, this.Position.X); } this.leave = true; this.itemm.shot = true; if (!this.lastone) { Time.Init(); } } else { Program.game.game.PlaySound("tan", true, this.Position.X); bg.Switch(false); } } if (this.leave) { this.numalpha -= 0.05f; if ((double)this.numalpha <= 0.0) { this.numalpha = 0.0f; } if (!this.lastone) { ++this.ltime; } else if (this.time % 3 == 0) { ++this.ltime; } if (this.letype == 3) { this.cirscale += 0.05f; } if (this.letype == 3 && this.ltime == 1) { this.ltime = 59; } int num = 0; if (this.ltime == 1 && this.dialogm != null && this.dialogm.next) { num = 40; } if (this.ltime == 59 + num) { Program.game.game.ClearSth("Enemy"); if (this.dialogm != null && this.dialogm.next) { this.dialogm.Continue(); this.wait = true; } } if (this.ltime >= 60 + num && (this.letype != 3 && this.ltime < 100 + num || this.letype == 3 && this.ltime < 140 + num)) { this.Leave(bg); } if (this.letype == 3 && this.ltime >= 140 + num || this.letype != 3 && this.ltime >= 100 + num) { Hashtable data = new Hashtable(); data[(object)"level"] = (object)Main.Level; data[(object)"type"] = (object)this.dialog; Program.game.achivmanager.Check(AchievementType.Challenge, 12, data); data[(object)"continued"] = (object)Program.game.game.BanRecord; data[(object)nameof(stage)] = (object)Program.game.game.StmStage; Program.game.achivmanager.Check(AchievementType.Challenge, 13, data); this.die = true; this.praticle.Delete(); Time.Init(); } if (this.itemm != null) { this.itemm.shot = true; } } else if (!Player.Dis && !Player.free && !Player.Wudi) { this.Judge(Player); } } else if (this.time >= 60) { Program.game.game.BanShoot(true); } if (!this.image) { return; } this.ImageUpdate(); }
public void Update(Character Player, CSManager csm, EnemyManager em, Boss boss) { Character Player1 = Player; ++this.time; if (this.time <= 40) { Program.game.game.bgcolor.a += 0.015f; if ((double)Program.game.game.bgcolor.a >= 1.0) { Program.game.game.bgcolor.a = 1f; } } if (this.time % 6 < 2) { Player.body.color.r = 0.0f; Player.body.color.g = 0.0f; } else { Player.body.color.r = 1f; Player.body.color.g = 1f; } if (this.cs != null) { switch (this.type) { case Cname.REIMU: Player.BanShoot = false; Vector2 vector2_1; Vector2 vector2_2; if (Main.Mode == Modes.SINGLE) { vector2_1 = new Vector2(42f, 406f); vector2_2 = new Vector2(43f, 453f); } else { vector2_1 = new Vector2(10f, 630f); vector2_2 = new Vector2(20f, 465f); } this.target.body.position.X = 224f; this.target.body.position.Y = 144f; foreach (Enemy enemy in em.EnemyArray) { if (!enemy.die && (double)enemy.Position.X >= (double)vector2_1.X && ((double)enemy.Position.X <= (double)vector2_1.Y && (double)enemy.Position.Y >= (double)vector2_2.X) && (double)enemy.Position.Y <= (double)vector2_2.Y) { this.target.body.position = enemy.Position; break; } } if (boss != null && !boss.leave) { this.target.body.position = boss.Position; } Player1 = this.target; if (this.time == 199) { Program.game.game.Quake(30, 3); break; } if (this.time == 229) { Program.game.game.Quake(30, 3); break; } if (this.time == 259) { Program.game.game.Quake(30, 3); break; } break; case Cname.MARISA: this.cs.SetPos(new Vector2(Player.body.position.X + 93f, Player.body.position.Y - 13f), true); Player.speedadd = new Vector2(0.15f, 0.02f); break; case Cname.SANAE: if (this.cs.Id == "e19") { Player.BanShoot = false; this.cs.SetPos(Player.body.position + new Vector2(93f, -13f), true); using (List <CrazyStorm> .Enumerator enumerator = csm.csc.GetEnumerator()) { while (enumerator.MoveNext()) { foreach (Layer layer in enumerator.Current.layerm.LayerArray) { foreach (Barrage barrage in layer.Barrages) { if (!barrage.Invincible && barrage.time > 15 | !barrage.Mist && (!barrage.NeedDelete && Math.Sqrt(((double)barrage.x - (double)Player.body.position.X - 93.0) * ((double)barrage.x - (double)Player.body.position.X - 93.0) + ((double)barrage.y - (double)Player.body.position.Y + 13.0) * ((double)barrage.y - (double)Player.body.position.Y + 13.0)) <= 100.0)) { barrage.life = 0; barrage.Dis = true; barrage.Blend = true; } } } } break; } } else { break; } case Cname.PATCHOULI: foreach (CrazyStorm crazyStorm in csm.csc) { foreach (Layer layer in crazyStorm.layerm.LayerArray) { foreach (Barrage barrage in layer.Barrages) { if (!barrage.Invincible && barrage.time > 15 | !barrage.Mist && (!barrage.NeedDelete && Math.Sqrt(((double)barrage.x - (double)Player.body.position.X - 93.0) * ((double)barrage.x - (double)Player.body.position.X - 93.0) + ((double)barrage.y - (double)Player.body.position.Y + 13.0) * ((double)barrage.y - (double)Player.body.position.Y + 13.0)) <= 168.0)) { barrage.life = 0; barrage.Dis = true; barrage.Blend = true; } } } } foreach (Enemy enemy in em.EnemyArray) { if (!enemy.IsInWudi() && Math.Sqrt(((double)enemy.Position.X - (double)Player.body.position.X) * ((double)enemy.Position.X - (double)Player.body.position.X) + ((double)enemy.Position.Y - (double)Player.body.position.Y) * ((double)enemy.Position.Y - (double)Player.body.position.Y)) <= 168.0) { enemy.hp -= 24; Program.game.game.Score += 10L; } } if (boss != null && Math.Sqrt(((double)boss.Position.X - (double)Player.body.position.X) * ((double)boss.Position.X - (double)Player.body.position.X) + ((double)boss.Position.Y - (double)Player.body.position.Y) * ((double)boss.Position.Y - (double)Player.body.position.Y)) <= 168.0) { Program.game.game.Score += 10L; if (boss.CardArray.Count >= 1) { boss.CardArray[0].DeHp(24, this.cs.isforshoot); } } if (this.cs.time.total - this.cs.time.now <= 20) { using (List <Layer> .Enumerator enumerator = this.cs.layerm.LayerArray.GetEnumerator()) { while (enumerator.MoveNext()) { foreach (Barrage barrage in enumerator.Current.Barrages) { barrage.alpha = (float)((this.cs.time.total - this.cs.time.now) * 5); } } break; } } else { break; } } } if (this.cs == null) { if (this.wait == 0) { if (this.type == Cname.MARISA) { Player.speedadd = new Vector2(1f, 1f); } Player.BanShoot = false; } ++this.wait; Program.game.game.bgcolor.a -= 0.015f; if ((double)Program.game.game.bgcolor.a <= 0.0) { Program.game.game.bgcolor.a = 0.0f; } if (this.wait != 40) { return; } Player.body.color.r = 1f; Player.body.color.g = 1f; this.wait = 0; this.die = true; } else if (this.cs.IsClosing()) { this.cs.EndStart(); this.cs.Break(); this.cs = (CrazyStorm)null; } else { if (!this.cs.Run()) { return; } this.cs.Update(Player1, em, boss); } }
public void SetCsm(CSManager csm_c) => csm = csm_c;
public CrazyStorm( GraphicsDevice g, CSManager csm_c, bool bansound_b, string filename, Vector2 Player) { shoot = new List <byte>(); id = filename; bgset = new List <BarrageType>(); csm = csm_c; bansound = bansound_b; layerm = new LayerManager(); center = new Center(); time = new Time(csm, this, layerm); StreamReader streamReader = new StreamReader(Cry.Decry("Content/Data/" + filename + ".xna", 0)); if (streamReader.ReadLine() == "Crazy Storm Data 1.01") { string source = streamReader.ReadLine(); if (File.Exists("Content/Data/" + filename + ".dat")) { tex = Texture2D.FromFile(g, Cry.Decry("Content/Data/" + filename + ".dat", 0)); } if (source.Contains("Types")) { int num = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num; ++index) { string str = streamReader.ReadLine(); BarrageType barrageType = new BarrageType { name = str.Split('_')[0], rect = new Rectangle(int.Parse(str.Split('_')[1]), int.Parse(str.Split('_')[2]), int.Parse(str.Split('_')[3]), int.Parse(str.Split('_')[4])), origin = new Vector2(int.Parse(str.Split('_')[5]), int.Parse(str.Split('_')[6])), origin0 = new Vector2(int.Parse(str.Split('_')[5]), int.Parse(str.Split('_')[6])), pdr0 = int.Parse(str.Split('_')[7]) }; if (str.Split('_')[8] != "") { barrageType.color = int.Parse(str.Split('_')[8]); } else { barrageType.color = -1; } bgset.Add(barrageType); } source = streamReader.ReadLine(); } if (source.Contains("GlobalEvents")) { int num1 = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num1; ++index) { string str = streamReader.ReadLine(); time.GEcount.Add(int.Parse(str.Split('_')[0]) - 1); GlobalEvent globalEvent = new GlobalEvent { gotocondition = int.Parse(str.Split('_')[1]), gotoopreator = str.Split('_')[2], gotocvalue = int.Parse(str.Split('_')[3]), isgoto = (bool.Parse(str.Split('_')[4]) ? 1 : 0) != 0, gototime = int.Parse(str.Split('_')[5]), gotowhere = int.Parse(str.Split('_')[6]), quakecondition = int.Parse(str.Split('_')[7]), quakeopreator = str.Split('_')[8], quakecvalue = int.Parse(str.Split('_')[9]), isquake = (bool.Parse(str.Split('_')[10]) ? 1 : 0) != 0, quaketime = int.Parse(str.Split('_')[11]), quakelevel = int.Parse(str.Split('_')[12]), stopcondition = int.Parse(str.Split('_')[13]), stopopreator = str.Split('_')[14], stopcvalue = int.Parse(str.Split('_')[15]), isstop = (bool.Parse(str.Split('_')[16]) ? 1 : 0) != 0, stoptime = int.Parse(str.Split('_')[17]), stoplevel = int.Parse(str.Split('_')[18]) }; if (time.GE.Count < int.Parse(str.Split('_')[0])) { int num2 = 0; while (true) { if (num2 < int.Parse(str.Split('_')[0])) { time.GE.Add(new GlobalEvent() { gotocondition = -1, quakecondition = -1, stopcondition = -1, stoplevel = -1 }); ++num2; } else { break; } } } time.GE[int.Parse(str.Split('_')[0]) - 1] = globalEvent; } source = streamReader.ReadLine(); } if (source.Contains("Sounds")) { int num = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num; ++index) { string str = streamReader.ReadLine(); csm.bgset[int.Parse(str.Split('_')[0]) - 1].sound = str.Split('_')[1]; } source = streamReader.ReadLine(); } if (source.Contains(',')) { center.Available = true; center.x = float.Parse(source.Split(':')[1].Split(',')[0]); center.y = float.Parse(source.Split(':')[1].Split(',')[1]); if (source.Split(':')[1].Split(',').Length >= 7) { center.speed = float.Parse(source.Split(':')[1].Split(',')[2]); center.speedd = float.Parse(source.Split(':')[1].Split(',')[3]); center.aspeed = float.Parse(source.Split(':')[1].Split(',')[4]); center.aspeedd = float.Parse(source.Split(':')[1].Split(',')[5]); int index = 0; while (true) { if (index < source.Split(':')[1].Split(',')[6].Split(';').Length - 1) { center.events.Add(source.Split(':')[1].Split(',')[6].Split(';')[index]); ++index; } else { break; } } } } else { center.Available = false; } time.total = int.Parse(streamReader.ReadLine().Split(',')[0].Split(':')[1]); for (int index1 = 0; index1 < 4; ++index1) { string str1 = streamReader.ReadLine(); if (str1.Split(':')[1].Split(',')[0] != "empty") { Layer layer = new Layer(layerm, int.Parse(str1.Split(':')[1].Split(',')[1]), int.Parse(str1.Split(':')[1].Split(',')[2])); int num1 = int.Parse(str1.Split(':')[1].Split(',')[3]); for (int index2 = 0; index2 < num1; ++index2) { string str2 = streamReader.ReadLine(); Batch batch = new Batch(float.Parse(str2.Split(',')[6]), float.Parse(str2.Split(',')[7]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), Binding = (bool.Parse(str2.Split(',')[2]) ? 1 : 0) != 0, bindid = int.Parse(str2.Split(',')[3]), Bindwithspeedd = (bool.Parse(str2.Split(',')[4]) ? 1 : 0) != 0, begin = int.Parse(str2.Split(',')[8]), life = int.Parse(str2.Split(',')[9]), fx = float.Parse(str2.Split(',')[10]), fy = float.Parse(str2.Split(',')[11]), r = int.Parse(str2.Split(',')[12]), rdirection = float.Parse(str2.Split(',')[13]) }; string str3 = str2.Split(',')[14].Replace("{", "").Replace("}", ""); batch.rdirections.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); batch.rdirections.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); batch.tiao = int.Parse(str2.Split(',')[15]); batch.t = int.Parse(str2.Split(',')[16]); batch.fdirection = float.Parse(str2.Split(',')[17]); string str4 = str2.Split(',')[18].Replace("{", "").Replace("}", ""); batch.fdirections.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); batch.fdirections.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); batch.range = int.Parse(str2.Split(',')[19]); batch.speed = float.Parse(str2.Split(',')[20]); batch.speedd = float.Parse(str2.Split(',')[21]); string str5 = str2.Split(',')[22].Replace("{", "").Replace("}", ""); batch.speedds.X = float.Parse(str5.Split(' ')[0].Split(':')[1]); batch.speedds.Y = float.Parse(str5.Split(' ')[1].Split(':')[1]); batch.aspeed = float.Parse(str2.Split(',')[23]); batch.aspeedd = float.Parse(str2.Split(',')[24]); string str6 = str2.Split(',')[25].Replace("{", "").Replace("}", ""); batch.aspeedds.X = float.Parse(str6.Split(' ')[0].Split(':')[1]); batch.aspeedds.Y = float.Parse(str6.Split(' ')[1].Split(':')[1]); batch.sonlife = int.Parse(str2.Split(',')[26]); batch.type = int.Parse(str2.Split(',')[27]); batch.wscale = float.Parse(str2.Split(',')[28]); batch.hscale = float.Parse(str2.Split(',')[29]); batch.colorR = int.Parse(str2.Split(',')[30]); batch.colorG = int.Parse(str2.Split(',')[31]); batch.colorB = int.Parse(str2.Split(',')[32]); batch.alpha = int.Parse(str2.Split(',')[33]); batch.head = float.Parse(str2.Split(',')[34]); string str7 = str2.Split(',')[35].Replace("{", "").Replace("}", ""); batch.heads.X = float.Parse(str7.Split(' ')[0].Split(':')[1]); batch.heads.Y = float.Parse(str7.Split(' ')[1].Split(':')[1]); batch.Withspeedd = (bool.Parse(str2.Split(',')[36]) ? 1 : 0) != 0; batch.sonspeed = float.Parse(str2.Split(',')[37]); batch.sonspeedd = float.Parse(str2.Split(',')[38]); string str8 = str2.Split(',')[39].Replace("{", "").Replace("}", ""); batch.sonspeedds.X = float.Parse(str8.Split(' ')[0].Split(':')[1]); batch.sonspeedds.Y = float.Parse(str8.Split(' ')[1].Split(':')[1]); batch.sonaspeed = float.Parse(str2.Split(',')[40]); batch.sonaspeedd = float.Parse(str2.Split(',')[41]); string str9 = str2.Split(',')[42].Replace("{", "").Replace("}", ""); batch.sonaspeedds.X = float.Parse(str9.Split(' ')[0].Split(':')[1]); batch.sonaspeedds.Y = float.Parse(str9.Split(' ')[1].Split(':')[1]); batch.xscale = float.Parse(str2.Split(',')[43]); batch.yscale = float.Parse(str2.Split(',')[44]); batch.Mist = (bool.Parse(str2.Split(',')[45]) ? 1 : 0) != 0; batch.Dispel = (bool.Parse(str2.Split(',')[46]) ? 1 : 0) != 0; batch.Blend = (bool.Parse(str2.Split(',')[47]) ? 1 : 0) != 0; batch.Afterimage = (bool.Parse(str2.Split(',')[48]) ? 1 : 0) != 0; batch.Outdispel = (bool.Parse(str2.Split(',')[49]) ? 1 : 0) != 0; batch.Invincible = (bool.Parse(str2.Split(',')[50]) ? 1 : 0) != 0; string str10 = str2.Split(',')[51]; int idx1 = 0; while (true) { if (idx1 < str10.Split('&').Length - 1) { string str11 = str10.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str11.Split('|')[0], t = int.Parse(str11.Split('|')[1]), addtime = int.Parse(str11.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str11.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str11.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } batch.Parentevents.Add(@event); ++idx1; } else { break; } } string str12 = str2.Split(',')[52]; int idx2 = 0; while (true) { if (idx2 < str12.Split('&').Length - 1) { string str11 = str12.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str11.Split('|')[0], t = int.Parse(str11.Split('|')[1]), addtime = int.Parse(str11.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str11.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str11.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } batch.Sonevents.Add(@event); ++idx2; } else { break; } } batch.rand.fx = float.Parse(str2.Split(',')[53]); batch.rand.fy = float.Parse(str2.Split(',')[54]); batch.rand.r = int.Parse(str2.Split(',')[55]); batch.rand.rdirection = float.Parse(str2.Split(',')[56]); batch.rand.tiao = int.Parse(str2.Split(',')[57]); batch.rand.t = int.Parse(str2.Split(',')[58]); batch.rand.fdirection = float.Parse(str2.Split(',')[59]); batch.rand.range = int.Parse(str2.Split(',')[60]); batch.rand.speed = float.Parse(str2.Split(',')[61]); batch.rand.speedd = float.Parse(str2.Split(',')[62]); batch.rand.aspeed = float.Parse(str2.Split(',')[63]); batch.rand.aspeedd = float.Parse(str2.Split(',')[64]); batch.rand.head = float.Parse(str2.Split(',')[65]); batch.rand.sonspeed = float.Parse(str2.Split(',')[66]); batch.rand.sonspeedd = float.Parse(str2.Split(',')[67]); batch.rand.sonaspeed = float.Parse(str2.Split(',')[68]); batch.rand.sonaspeedd = float.Parse(str2.Split(',')[69]); if (str2.Split(',').Length >= 72) { batch.Cover = (bool.Parse(str2.Split(',')[70]) ? 1 : 0) != 0; batch.Rebound = (bool.Parse(str2.Split(',')[71]) ? 1 : 0) != 0; batch.Force = (bool.Parse(str2.Split(',')[72]) ? 1 : 0) != 0; } if (str2.Split(',').Length >= 74) { batch.Deepbind = (bool.Parse(str2.Split(',')[73]) ? 1 : 0) != 0; } layerm.LayerArray[index1].BatchArray.Add(batch); } if (str1.Split(':')[1].Split(',').Length >= 7) { int num2 = int.Parse(str1.Split(':')[1].Split(',')[4]); for (int index2 = 0; index2 < num2; ++index2) { string str2 = streamReader.ReadLine(); Lase lase = new Lase(float.Parse(str2.Split(',')[6]), float.Parse(str2.Split(',')[7]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), Binding = (bool.Parse(str2.Split(',')[2]) ? 1 : 0) != 0, bindid = int.Parse(str2.Split(',')[3]), Bindwithspeedd = (bool.Parse(str2.Split(',')[4]) ? 1 : 0) != 0, begin = int.Parse(str2.Split(',')[8]), life = int.Parse(str2.Split(',')[9]), r = int.Parse(str2.Split(',')[10]), rdirection = float.Parse(str2.Split(',')[11]) }; string str3 = str2.Split(',')[12].Replace("{", "").Replace("}", ""); lase.rdirections.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); lase.rdirections.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); lase.tiao = int.Parse(str2.Split(',')[13]); lase.t = int.Parse(str2.Split(',')[14]); lase.fdirection = float.Parse(str2.Split(',')[15]); string str4 = str2.Split(',')[16].Replace("{", "").Replace("}", ""); lase.fdirections.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); lase.fdirections.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); lase.range = int.Parse(str2.Split(',')[17]); lase.speed = float.Parse(str2.Split(',')[18]); lase.speedd = float.Parse(str2.Split(',')[19]); string str5 = str2.Split(',')[20].Replace("{", "").Replace("}", ""); lase.speedds.X = float.Parse(str5.Split(' ')[0].Split(':')[1]); lase.speedds.Y = float.Parse(str5.Split(' ')[1].Split(':')[1]); lase.aspeed = float.Parse(str2.Split(',')[21]); lase.aspeedd = float.Parse(str2.Split(',')[22]); string str6 = str2.Split(',')[23].Replace("{", "").Replace("}", ""); lase.aspeedds.X = float.Parse(str6.Split(' ')[0].Split(':')[1]); lase.aspeedds.Y = float.Parse(str6.Split(' ')[1].Split(':')[1]); lase.sonlife = int.Parse(str2.Split(',')[24]); lase.type = int.Parse(str2.Split(',')[25]); lase.wscale = float.Parse(str2.Split(',')[26]); lase.longs = float.Parse(str2.Split(',')[27]); lase.alpha = int.Parse(str2.Split(',')[28]); lase.Ray = (bool.Parse(str2.Split(',')[29]) ? 1 : 0) != 0; lase.sonspeed = float.Parse(str2.Split(',')[30]); lase.sonspeedd = float.Parse(str2.Split(',')[31]); string str7 = str2.Split(',')[32].Replace("{", "").Replace("}", ""); lase.sonspeedds.X = float.Parse(str7.Split(' ')[0].Split(':')[1]); lase.sonspeedds.Y = float.Parse(str7.Split(' ')[1].Split(':')[1]); lase.sonaspeed = float.Parse(str2.Split(',')[33]); lase.sonaspeedd = float.Parse(str2.Split(',')[34]); string str8 = str2.Split(',')[35].Replace("{", "").Replace("}", ""); lase.sonaspeedds.X = float.Parse(str8.Split(' ')[0].Split(':')[1]); lase.sonaspeedds.Y = float.Parse(str8.Split(' ')[1].Split(':')[1]); lase.xscale = float.Parse(str2.Split(',')[36]); lase.yscale = float.Parse(str2.Split(',')[37]); lase.Blend = (bool.Parse(str2.Split(',')[38]) ? 1 : 0) != 0; lase.Outdispel = (bool.Parse(str2.Split(',')[39]) ? 1 : 0) != 0; lase.Invincible = (bool.Parse(str2.Split(',')[40]) ? 1 : 0) != 0; string str9 = str2.Split(',')[42]; int idx1 = 0; while (true) { if (idx1 < str9.Split('&').Length - 1) { string str10 = str9.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str10.Split('|')[0], t = int.Parse(str10.Split('|')[1]), addtime = int.Parse(str10.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str10.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str10.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } lase.Parentevents.Add(@event); ++idx1; } else { break; } } string str11 = str2.Split(',')[43]; int idx2 = 0; while (true) { if (idx2 < str11.Split('&').Length - 1) { string str10 = str11.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str10.Split('|')[0], t = int.Parse(str10.Split('|')[1]), addtime = int.Parse(str10.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str10.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str10.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } lase.Sonevents.Add(@event); ++idx2; } else { break; } } lase.rand.r = int.Parse(str2.Split(',')[44]); lase.rand.rdirection = float.Parse(str2.Split(',')[45]); lase.rand.tiao = int.Parse(str2.Split(',')[46]); lase.rand.t = int.Parse(str2.Split(',')[47]); lase.rand.fdirection = float.Parse(str2.Split(',')[48]); lase.rand.range = int.Parse(str2.Split(',')[49]); lase.rand.speed = float.Parse(str2.Split(',')[50]); lase.rand.speedd = float.Parse(str2.Split(',')[51]); lase.rand.aspeed = float.Parse(str2.Split(',')[52]); lase.rand.aspeedd = float.Parse(str2.Split(',')[53]); lase.rand.sonspeed = float.Parse(str2.Split(',')[54]); lase.rand.sonspeedd = float.Parse(str2.Split(',')[55]); lase.rand.sonaspeed = float.Parse(str2.Split(',')[56]); lase.rand.sonaspeedd = float.Parse(str2.Split(',')[57]); if (str2.Split(',').Length >= 59) { lase.Deepbind = (bool.Parse(str2.Split(',')[58]) ? 1 : 0) != 0; } layerm.LayerArray[index1].LaseArray.Add(lase); } int num3 = int.Parse(str1.Split(':')[1].Split(',')[5]); for (int index2 = 0; index2 < num3; ++index2) { string str2 = streamReader.ReadLine(); Cover cover = new Cover(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), halfw = int.Parse(str2.Split(',')[6]), halfh = int.Parse(str2.Split(',')[7]), Circle = (bool.Parse(str2.Split(',')[8]) ? 1 : 0) != 0, type = int.Parse(str2.Split(',')[9]), controlid = int.Parse(str2.Split(',')[10]), speed = float.Parse(str2.Split(',')[11]), speedd = float.Parse(str2.Split(',')[12]) }; string str3 = str2.Split(',')[13].Replace("{", "").Replace("}", ""); cover.speedds.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); cover.speedds.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); cover.aspeed = float.Parse(str2.Split(',')[14]); cover.aspeedd = float.Parse(str2.Split(',')[15]); string str4 = str2.Split(',')[16].Replace("{", "").Replace("}", ""); cover.aspeedds.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); cover.aspeedds.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); string str5 = str2.Split(',')[17]; int idx1 = 0; while (true) { if (idx1 < str5.Split('&').Length - 1) { string str6 = str5.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str6.Split('|')[0], t = int.Parse(str6.Split('|')[1]), addtime = int.Parse(str6.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str6.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str6.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } cover.Parentevents.Add(@event); ++idx1; } else { break; } } string str7 = str2.Split(',')[18]; int idx2 = 0; while (true) { if (idx2 < str7.Split('&').Length - 1) { string str6 = str7.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str6.Split('|')[0], t = int.Parse(str6.Split('|')[1]), addtime = int.Parse(str6.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str6.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str6.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } cover.Sonevents.Add(@event); ++idx2; } else { break; } } cover.rand.speed = float.Parse(str2.Split(',')[19]); cover.rand.speedd = float.Parse(str2.Split(',')[20]); cover.rand.aspeed = float.Parse(str2.Split(',')[21]); cover.rand.aspeedd = float.Parse(str2.Split(',')[22]); if (str2.Split(',').Length >= 24) { cover.bindid = int.Parse(str2.Split(',')[23]); } if (str2.Split(',').Length >= 25) { if (str2.Split(',')[24] != "") { cover.Deepbind = (bool.Parse(str2.Split(',')[24]) ? 1 : 0) != 0; } } layerm.LayerArray[index1].CoverArray.Add(cover); } int num4 = int.Parse(str1.Split(':')[1].Split(',')[6]); for (int index2 = 0; index2 < num4; ++index2) { string str2 = streamReader.ReadLine(); Rebound rebound = new Rebound(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), longs = int.Parse(str2.Split(',')[6]), angle = int.Parse(str2.Split(',')[7]), time = int.Parse(str2.Split(',')[8]), speed = float.Parse(str2.Split(',')[9]), speedd = float.Parse(str2.Split(',')[10]), aspeed = float.Parse(str2.Split(',')[11]), aspeedd = float.Parse(str2.Split(',')[12]) }; string str3 = str2.Split(',')[13]; int idx = 0; while (true) { if (idx < str3.Split('&').Length - 1) { string str4 = str3.Split('&')[idx]; rebound.Parentevents.Add(new Event(idx) { tag = str4 }); ++idx; } else { break; } } rebound.rand.speed = float.Parse(str2.Split(',')[14]); rebound.rand.speedd = float.Parse(str2.Split(',')[15]); rebound.rand.aspeed = float.Parse(str2.Split(',')[16]); rebound.rand.aspeedd = float.Parse(str2.Split(',')[17]); layerm.LayerArray[index1].ReboundArray.Add(rebound); } int num5 = int.Parse(str1.Split(':')[1].Split(',')[7]); for (int index2 = 0; index2 < num5; ++index2) { string str2 = streamReader.ReadLine(); layerm.LayerArray[index1].ForceArray.Add(new Force(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), halfw = int.Parse(str2.Split(',')[6]), halfh = int.Parse(str2.Split(',')[7]), Circle = (bool.Parse(str2.Split(',')[8]) ? 1 : 0) != 0, type = int.Parse(str2.Split(',')[9]), controlid = int.Parse(str2.Split(',')[10]), speed = float.Parse(str2.Split(',')[11]), speedd = float.Parse(str2.Split(',')[12]), aspeed = float.Parse(str2.Split(',')[13]), aspeedd = float.Parse(str2.Split(',')[14]), addaspeed = float.Parse(str2.Split(',')[15]), addaspeedd = float.Parse(str2.Split(',')[16]), Suction = (bool.Parse(str2.Split(',')[17]) ? 1 : 0) != 0, Repulsion = (bool.Parse(str2.Split(',')[18]) ? 1 : 0) != 0, addspeed = float.Parse(str2.Split(',')[19]), rand = { speed = float.Parse(str2.Split(',')[20]), speedd = float.Parse(str2.Split(',')[21]), aspeed = float.Parse(str2.Split(',')[22]), aspeedd = float.Parse(str2.Split(',')[23]) } }); } } } } } time.Init(Player); }
public CrazyStorm(CSManager csm_c) { shoot = new List <byte>(); csm = csm_c; center = new Center(); }
public void Update( LayerManager lm, CrazyStorm cs, CSManager csm, Time Times, Center Centers, Character Player, EnemyManager em, Boss b, bool bs, bool allpan, Vector2 ppos, bool isforshoot, bool usekira, bool bansound) { if (!cs.IsClosing() && this.Visible) { for (int index = 0; index < this.ForceArray.Count; ++index) { this.ForceArray[index].id = index; this.ForceArray[index].parentid = this.sort; this.ForceArray[index].copys.Update(lm, Times, Centers, Player); } for (int index = 0; index < this.ReboundArray.Count; ++index) { this.ReboundArray[index].id = index; this.ReboundArray[index].parentid = this.sort; this.ReboundArray[index].copys.Update(lm, cs, Times, Centers, Player.body.position + new Vector2(93f, -13f)); } for (int index = 0; index < this.CoverArray.Count; ++index) { this.CoverArray[index].id = index; this.CoverArray[index].parentid = this.sort; this.CoverArray[index].copys.Update(lm, cs, Times, Centers, Player.body.position + new Vector2(93f, -13f)); } for (int index = 0; index < this.LaseArray.Count; ++index) { this.LaseArray[index].id = index; this.LaseArray[index].parentid = this.sort; this.LaseArray[index].copys.Update(lm, cs, Times, Centers, Player.body.position + new Vector2(93f, -13f)); } for (int index = 0; index < this.BatchArray.Count; ++index) { this.BatchArray[index].id = index; this.BatchArray[index].parentid = this.sort; this.BatchArray[index].copys.Update(lm, cs, Times, Centers, Player.body.position + new Vector2(93f, -13f)); } } bool flag = false; for (int index = 0; index < this.Barrages.Count; ++index) { this.Barrages[index].id = index; this.Barrages[index].Update(csm, cs, Times, Centers, Player, em, b, bs, allpan, ppos, isforshoot, usekira, bansound); this.Barrages[index].LUpdate(csm, cs, Times, Centers, Player, bs); if (cs.IsBreaking()) { if (!this.Barrages[index].Dis && cs.IsItem()) { Program.game.game.SmallItem(new Vector2(this.Barrages[index].x - 93f, this.Barrages[index].y + 13f)); flag = true; } this.Barrages[index].life = 0; this.Barrages[index].Dis = true; this.Barrages[index].Blend = true; this.Barrages[index].randf = 6.283185f * (float)Main.rand.NextDouble(); } } if (!flag) { return; } cs.itemed = true; }
public void Update(CSManager csm, CrazyStorm cs, Time t, Character Player, Boss boss) { if (!this.Available) { return; } this.speedx += this.aspeedx; this.speedy += this.aspeedy; this.ox += this.speedx; this.ox += this.speedy; boss?.Setpos(boss.Position.X + this.speedx, boss.Position.Y + this.speedy); Hashtable hashtable1 = new Hashtable(); Hashtable hashtable2 = new Hashtable(); hashtable1.Add((object)"当前帧", (object)t.now); hashtable2.Add((object)"速度", (object)this.ospeed); hashtable2.Add((object)"速度方向", (object)this.ospeedd); hashtable2.Add((object)"加速度", (object)this.oaspeed); hashtable2.Add((object)"加速度方向", (object)this.oaspeedd); foreach (string str1 in this.events) { if (str1.Contains("PlayMusic")) { int num = int.Parse(str1.Split('=')[1].Split(':')[0]); if (t.now == num || num > t.total && t.times > 0 && t.now == num - t.total) { Program.game.game.PlaySound(str1.Split('(')[1].Split(')')[0], true, this.x); } } else if (str1.Contains("UseKira")) { cs.usekira = true; } else if (str1.Contains("BanSound")) { cs.bansoundbg = true; } else { string s = str1.Split(':')[0]; string str2 = ""; string str3 = ""; string str4 = str1.Split(':')[1]; int num1 = 0; string str5 = ""; int num2 = 0; string str6 = ""; float num3 = 0.0f; int num4 = 0; if (s.Contains("=")) { str2 = s.Split('=')[0]; str3 = "="; s = s.Split('=')[1]; } if (str3 == "=" && (double)float.Parse(hashtable1[(object)str2].ToString()) == (double)float.Parse(s)) { if (str1.Contains("变化到")) { num1 = 0; string[] strArray = str4.Split("变化到".ToCharArray())[3].Split(",".ToCharArray()); num2 = (int)csm.results3[(object)str4.Split("变化到".ToCharArray())[0]]; str6 = str4.Split("变化到".ToCharArray())[0]; if (strArray[0].Contains <char>('+')) { num3 = (float)((double)float.Parse(strArray[0].Split('+')[0]) + (double)MathHelper.Lerp((float)-(double)float.Parse(strArray[0].Split('+')[1]), float.Parse(strArray[0].Split('+')[1]), (float)this.Rand(cs.effect && !cs.bomb, cs.bomb))); } else { num3 = num2 == 1 || num2 == 3 ? (!strArray[0].Contains("自机") ? float.Parse(strArray[0]) : MathHelper.ToDegrees(Main.Twopointangle(Player.body.position.X + 93f, Player.body.position.Y - 13f, this.ox, this.oy))) : float.Parse(strArray[0]); } str5 = strArray[1]; num4 = int.Parse(strArray[2].Split("帧".ToCharArray())[0]); } else if (str1.Contains("增加")) { num1 = 1; string[] strArray = str4.Split("增".ToCharArray())[1].Split(",".ToCharArray()); strArray[0] = strArray[0].Replace("加", ""); num2 = (int)csm.results3[(object)str4.Split("增".ToCharArray())[0]]; str6 = str4.Split("增".ToCharArray())[0]; if (strArray[0].Contains <char>('+')) { num3 = (float)((double)float.Parse(strArray[0].Split('+')[0]) + (double)MathHelper.Lerp((float)-(double)float.Parse(strArray[0].Split('+')[1]), float.Parse(strArray[0].Split('+')[1]), (float)this.Rand(cs.effect && !cs.bomb, cs.bomb))); } else { num3 = num2 == 1 || num2 == 3 ? (!strArray[0].Contains("自机") ? float.Parse(strArray[0]) : MathHelper.ToDegrees(Main.Twopointangle(Player.body.position.X + 93f, Player.body.position.Y - 13f, this.ox, this.oy))) : float.Parse(strArray[0]); } str5 = strArray[1]; num4 = int.Parse(strArray[2].Split("帧".ToCharArray())[0]); } else if (str1.Contains("减少")) { num1 = 2; string[] strArray = str4.Split("减少".ToCharArray())[2].Split(",".ToCharArray()); num2 = (int)csm.results3[(object)str4.Split("减少".ToCharArray())[0]]; str6 = str4.Split("减少".ToCharArray())[0]; if (strArray[0].Contains <char>('+')) { num3 = (float)((double)float.Parse(strArray[0].Split('+')[0]) + (double)MathHelper.Lerp((float)-(double)float.Parse(strArray[0].Split('+')[1]), float.Parse(strArray[0].Split('+')[1]), (float)this.Rand(cs.effect && !cs.bomb, cs.bomb))); } else { num3 = num2 == 1 || num2 == 3 ? (!strArray[0].Contains("自机") ? float.Parse(strArray[0]) : MathHelper.ToDegrees(Main.Twopointangle(Player.body.position.X + 93f, Player.body.position.Y - 13f, this.ox, this.oy))) : float.Parse(strArray[0]); } str5 = strArray[1]; num4 = int.Parse(strArray[2].Split("帧".ToCharArray())[0]); } if (str1.Contains("跟随自机")) { this.Eventsexe.Add(new CExecution() { changetype = 3, ctime = 60 }); } else if (str1.Contains("范围移动")) { this.Eventsexe.Add(new CExecution() { changetype = 4, ctime = 60, value = MathHelper.Lerp(float.Parse(str1.Split(',')[1]), float.Parse(str1.Split(',')[2]), (float)this.Rand(cs.effect && !cs.bomb, cs.bomb)), value2 = MathHelper.Lerp(float.Parse(str1.Split(',')[3]), float.Parse(str1.Split(',')[4]), (float)this.Rand(cs.effect && !cs.bomb, cs.bomb)) }); } else { CExecution cexecution = new CExecution() { change = num1, changetype = (int)csm.type[(object)str5], changevalue = num2, value = num3, region = hashtable2[(object)str6].ToString(), time = num4 }; cexecution.ctime = cexecution.time; this.Eventsexe.Add(cexecution); } } } } for (int index = 0; index < this.Eventsexe.Count; ++index) { if (!this.Eventsexe[index].NeedDelete) { this.Eventsexe[index].Update(this, Player, boss); } else { this.Eventsexe.RemoveAt(index); --index; } } }