private void booleanSelectButton_Click(object sender, EventArgs e) { //set the player who clicked to void character if (Form1.P1Character == "unselected") { Form1.P1Character = "Boolean"; P1SelectionLabel.Visible = true; P1SelectionLabel.Location = new Point(437, 274); P1PreviewBox.Image = Properties.Resources.Boolean_Passive; P1CharNameLabel.Text = "Boolean"; Refresh(); } else if (Form1.P2Character == "unselected") { Form1.P2Character = "Boolean"; P2SelectionLabel.Visible = true; P2SelectionLabel.Location = new Point(437, 310); P2PreviewBox.Image = Properties.Resources.Boolean_Passive__2_; P2CharNameLabel.Text = "Boolean"; Refresh(); //once player two has selected a character show the fight button FightButton.Show(); FightButton.Focus(); FightButton.BringToFront(); } }
//if keycode character is selected private void KeycodeSelect_Click(object sender, EventArgs e) { //set player who clicked to keycode character if (Form1.P1Character == "unselected") { Form1.P1Character = "Keycode"; P1SelectionLabel.Visible = true; P1SelectionLabel.Location = new Point(437, 154); P1PreviewBox.Image = Properties.Resources.Keycode_passive; P1CharNameLabel.Text = "Keycode"; Refresh(); } else if (Form1.P2Character == "unselected") { Form1.P2Character = "Keycode"; P2SelectionLabel.Visible = true; P2SelectionLabel.Location = new Point(437, 191); P2PreviewBox.Image = Properties.Resources.P2Keycode_passive; P2CharNameLabel.Text = "Keycode"; Refresh(); //once player two has selected a character show the fight button FightButton.Show(); FightButton.Focus(); FightButton.BringToFront(); } }
private void PocDefine() { if (endflag) { this.Close(); return; } int type = Story.GetStoryType(); Addflag = true; //0 as Normal Story Line //1 as chararcter Screen //2 as Request if (type == 0) { onType = 0; TutorialScreen.Show(); CharacterScreen.Hide(); SetTutorialPic(Story.GetPicID()); AddText(Story.GetStoryText()); } if (type == 99) { onType = 0; CreateHero c = new CreateHero(); AddText(Story.GetStoryText()); c.ShowDialog(); Story.next++; PocDefine(); return; } if (type == 98) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); Request r = new Request(Story.GetRequestID()); r.ShowDialog(); name = r.name; } if (type == 97) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); nextflag = false; attacknum = 3; FuncButton.Text = "攻擊鈕-剩餘3次"; FuncButton.Show(); } if (type == 96) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); LevelUP u = new LevelUP(1, 1, 2, "請使用++這個運算子來為想要提升之能力升級,請注意項目名稱和別忘了加上分號。打完後記得按ENTER確認唷!"); u.ShowDialog(); SetCharacter(u); Story.next++; PocDefine(); return; } if (type == 95) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); AddText(Story.GetStoryText()); HandleEventString(Story.GetEventID()); nextflag = false; FightButton.Show(); EscapeButton.Show(); Story.next++; return; } if (type == 1) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); HandleEventString(Story.GetEventID()); SetOtherPic(Story.GetPicID()); if (Addflag) { AddText(Story.GetStoryText()); } } if (type == 2) { onType = 1; TutorialScreen.Hide(); CharacterScreen.Show(); SetOtherPic(Story.GetPicID()); HandleEventString(Story.GetEventID()); AddText(Story.GetStoryText()); MainCharacter.Image = Image.FromFile(Application.StartupPath + "\\myHero.jpg"); Request r = new Request(Story.GetRequestID()); r.ShowDialog(); Story.next++; PocDefine(); return; } if (type == 999) { onType = 0; TutorialScreen.Show(); CharacterScreen.Hide(); SetTutorialPic(Story.GetPicID()); AddText(Story.GetStoryText()); endflag = true; } Story.next++; }