Inheritance: MonoBehaviour
Exemplo n.º 1
0
        private void EscapeStringCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            EscapeButton.Focus();

            _m.EscaperConvertedString = StringEscaper.QuoteEscape(_m.EscaperStringToConvert, false, _m.EscaperEscapePercentFlag);

            ConvertedStringTextBox.Focus();
        }
Exemplo n.º 2
0
        private void FightButton_Click(object sender, EventArgs e)
        {
            if (monsterDa >= hp)
            {
                MessageBox.Show("勇者,還是快逃吧!");
            }
            else
            {
                EscapeButton.Hide();
                FightButton.Hide();

                FuncButton.Show();
                FuncButton.Text = "攻擊鈕-剩餘" + attacknum + "次";
            }
        }
Exemplo n.º 3
0
 public MainScreen()
 {
     InitializeComponent();
     //Story.SetNext(64);
     TutorialScreen.BringToFront();
     TutorialScreen.Show();
     CharacterName.Text = "";
     LabelODa.Text      = LabelOHP.Text = LabelDa.Text = LabelHP.Text = LabelLv.Text = "";
     kill    = hp = da = 0;
     lv      = 'C';
     Rank[1] = 'C';
     Rank[2] = 'B';
     Rank[3] = 'A';
     Rank[4] = 'S';
     FightButton.Hide();
     EscapeButton.Hide();
     FuncButton.Hide();
     da = 10;
     hp = 10;
     PocDefine();
 }
Exemplo n.º 4
0
 private void EscapeButton_Click(object sender, EventArgs e)
 {
     FightButton.Hide();
     EscapeButton.Hide();
     PocDefine();
 }
Exemplo n.º 5
0
        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++;
        }