public Character(Sprite b, Sprite j, Texture2D sb, Texture2D it, Cname t, Attribute atb1, Attribute atb2) { body = b; judge = j; selfb = sb; type = t; mattribute = atb1; sattribute = atb2; body.position = new Vector2(224f, 420f); body.origin = new Vector2(30f, 25f); body.rect = new Rectangle(0, (int)(type - 1) * 60, 60, 60); body.scale = new Vector2(1f, 1f); judge.position = body.position; judge.origin = new Vector2(35f, 36f); if (Main.Mode == Modes.SINGLE) { rangex = new Vector2(42f, 406f); rangey = new Vector2(43f, 453f); } else { rangex = new Vector2(10f, 630f); rangey = new Vector2(20f, 465f); } Ban = true; equip = new Equipment(selfb); Program.game.game.DrawJudge += new Game.DrawDelegate2(DrawJudge); praticle = new Praticle(false, true, new Rectangle(49, 48, 14, 13), new Vector4(body.position.X, body.position.Y, 0.0f, 0.0f), new Vector2(7f, 7f), 18, 5, 30, 3f, 0.0f, new Vector2(0.0f, 360f), 10f); praticle.scale = new Vector4(1.2f, 0.4f, 0.0f, 0.0f); praticle.calpha = 1f; praticle.stop = true; speedadd = new Vector2(1f, 1f); }
protected static void CEquipShoot(Texture2D s, Cname t, int id, Vector2 p, List <Sprite> sprt) { EquipShoot.ctime += Time.Stop; switch (t) { case Cname.REIMU: if (id != 0) { break; } EquipShoot.H_AMULET(s, p, sprt); break; case Cname.MARISA: if (id != 0) { break; } EquipShoot.D_TORPEDO(s, p, sprt); break; case Cname.SANAE: if (id != 0) { break; } EquipShoot.S_BOMB(s, p, sprt); break; } }
/// <summary> /// 学生ID不能为空 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void xueshengID_LostFocus(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(xueshengID.Text)) { System.Windows.MessageBox.Show("学生ID不能为空!"); Cname.Focus(); } }
/// <summary> /// C#成绩验证 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Cname_LostFocus(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(Cname.Text)) { System.Windows.MessageBox.Show("C#成绩不能为空!"); Cname.Focus(); } }
private static void NORMAL(Texture2D s, Cname t, Vector2 p) { if ((double)EquipShoot.btime < 3.0) { return; } Program.game.game.PlaySound("plst", true, p.X); Rectangle r = new Rectangle(); Vector2 o = new Vector2(); float alpha_f = 0.0f; Vector2 scale_v = new Vector2(); switch (t) { case Cname.REIMU: r = new Rectangle(8, 0, 28, 59); o = new Vector2(14f, 26f); scale_v = new Vector2(0.9f, 0.9f); alpha_f = 0.7f; break; case Cname.MARISA: r = new Rectangle(43, 7, 23, 38); o = new Vector2(11f, 15f); scale_v = new Vector2(0.9f, 0.9f); alpha_f = 0.7f; break; case Cname.SANAE: r = new Rectangle(78, 6, 22, 40); o = new Vector2(11f, 19f); scale_v = new Vector2(0.9f, 0.9f); alpha_f = 0.8f; break; case Cname.PATCHOULI: r = new Rectangle(108, 9, 25, 44); o = new Vector2(12f, 17f); scale_v = new Vector2(0.9f, 0.9f); alpha_f = 0.8f; break; } SelfBarrage selfBarrage1 = new SelfBarrage(s, r, o, new Vector2(p.X - 10f, p.Y + 10f), alpha_f, scale_v) { speed = 20f, speedd = -90f, power = 20 }; SelfBarrage selfBarrage2 = new SelfBarrage(s, r, o, new Vector2(p.X + 10f, p.Y + 10f), alpha_f, scale_v) { speed = 20f, speedd = -90f, power = 20 }; EquipShoot.btime = 0.0f; }
protected static void BEquipShoot(Texture2D s, Cname t, int id, Vector2 p) { EquipShoot.btime += Time.Stop; if (id != 0) { return; } EquipShoot.NORMAL(s, t, p); }
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; }
public Dialog( Sprite tex_s, Sprite dm_s, Sprite[] db_s, Sprite name_s, int stage, Cname c, int type, Boss b_b) { this.name = name_s; this.name.position = new Vector2(207f, 244f); this.colorm = this.colorb = 0.5f; this.now = this.now2 = -1; this.last = this.last2 = -1; this.b = b_b; this.sr = new StreamReader(Cry.Decry("Content/Data/d" + stage.ToString() + type.ToString() + ((int)c).ToString() + ".xna", 2)); this.n = this.sr.ReadLine(); if (this.n == "PAUSE") { this.next = true; this.time = 10; } else { string str = this.n.Split(']')[0].Remove(0, 1); if (str.Length != 2) { this.now = int.Parse(str[0].ToString()); this.now2 = -1; } else { this.now = int.Parse(str[0].ToString()); this.now2 = int.Parse(str[1].ToString()); } } this.dm = dm_s; this.dm.color.a = 0.0f; this.db = db_s; for (int index = 0; index < this.db.Length; ++index) { this.db[index].color.a = 0.0f; } this.left = new Vector2(-30f, 92f); this.right = new Vector2(210f, 92f); this.tex = tex_s; this.tex.color.a = 0.0f; this.tex.origin = new Vector2(195f, 60f); this.tex.position = new Vector2(224f, 400f); Program.game.game.Drawevents += new Game.DrawDelegate(this.Draw); }
public Boss( Texture2D tex_t, Texture2D bosslist_t, Hashtable[] spellcard_h, Sprite dialog_s, Sprite dm_s, Sprite[] db_s, Sprite name_s, int stage, int bgtype, Cname c, Effect force_e, List <float[]> bossset_l, int type_i, int dialog_i, int entype_i, int letype_i, int cards_i, int color_i) { this.fsposition = new Dictionary <string, Vector2>(); this.fscenter = new Dictionary <string, Vector2>(); this.fsrect = new Dictionary <string, Rectangle>(); this.fsscale = new Dictionary <string, float>(); this.fsframe = new Dictionary <string, int>(); this.imageid = stage.ToString() + bgtype.ToString(); this.tex = tex_t; this.bosslist = bosslist_t; this.spellcard = spellcard_h; this.bossset = bossset_l; this.force = force_e; this.type = type_i; this.InitType(this.type); this.dialog = dialog_i; this.colortype = color_i; if (this.dialog != -1) { if (File.Exists("Content/Data/d" + stage.ToString() + this.dialog.ToString() + ((int)c).ToString() + ".xna")) { this.dialogm = new Dialog(dialog_s, dm_s, db_s, name_s, stage, c, this.dialog, this); this.wait = true; goto label_4; } } this.wait = false; label_4: this.entype = entype_i; this.InitEnType(this.entype); this.letype = letype_i; this.passedCards = 0; this.praticle = new Praticle(false, true, new Rectangle(49, 48, 14, 13), new Vector4(this.Position.X - 15f, this.Position.Y - 15f, 30f, 30f), 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; this.praticle2 = new Praticle(true, true, new Rectangle(2, 37, 38, 38), new Vector4(this.Position.X - 15f, this.Position.Y - 15f, 45f, 45f), new Vector2(19f, 19f), 60, 0, 40, 0.0f, 0.08f, new Vector2(-90f, 0.0f), 10f); this.praticle2.scale = new Vector4(1.2f, 0.4f, 0.5f, 0.0f); this.sppraticle = new Praticle(true, true, new Rectangle(2, 37, 38, 38), new Vector4(this.Position.X - 15f, this.Position.Y - 15f, 45f, 45f), new Vector2(19f, 19f), 60, 0, 40, 0.0f, 0.08f, new Vector2(-90f, 0.0f), 10f); this.sppraticle.scale = new Vector4(1.2f, 0.4f, 0.5f, 0.0f); this.sppraticle.stop = true; this.sppraticle2 = new Praticle(true, true, new Rectangle(2, 37, 38, 38), new Vector4(this.Position.X - 15f, this.Position.Y - 15f, 45f, 45f), new Vector2(19f, 19f), 60, 0, 40, 0.0f, 0.08f, new Vector2(-90f, 0.0f), 10f); this.sppraticle2.scale = new Vector4(1.2f, 0.4f, 0.5f, 0.0f); this.sppraticle2.stop = true; this.praticle3 = new Praticle(false, true, new Rectangle(71, 48, 76, 76), new Vector4(this.Position.X - 5f, this.Position.Y - 5f, 10f, 10f), new Vector2(38f, 38f), 150, 30, 100, 2f, 0.0f, new Vector2(0.0f, 360f), 30f); this.praticle3.speedr = 3f; this.praticle3.calpha = 1f; this.praticle3.rotation = new Vector4(0.0f, 90f, 90f, 180f); this.praticle3.scale = new Vector4(0.5f, 2.5f, 0.5f, 0.5f); this.praticle3.stop = true; this.CardArray = new List <BossCard>(); this.SpecialInit(); }
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; }