Esempio n. 1
0
 private void conf_Click(object sender, EventArgs e)
 {
     if (Int32.Parse(statcount.Text) == 0)
     {
         currplayer.lvlup(Int32.Parse(stat[0].Text), Int32.Parse(stat[1].Text), Int32.Parse(stat[2].Text), Int32.Parse(stat[3].Text), Int32.Parse(stat[4].Text));
         currplayer.save(currplayer);
         panel1.Controls.Clear();
         stattext.Visible  = false;
         statcount.Visible = false;
         conf.Visible      = false;
         redravform();
     }
     else
     {
         MessageBox.Show("You haven`t used all stat points yet");
     }
 }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            PlayerFighter currentplayer = new PlayerFighter(textBox1.Text, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0);
            string        path          = Directory.GetCurrentDirectory() + @"\Save\" + textBox1.Text + ".json";

            if (!File.Exists(path))
            {
                currentplayer.save(currentplayer);
                GameMain f1 = new GameMain();
                f1.Owner = this.Owner;
                f1.Show();
                f1.currplayer = currentplayer;
                this.Close();
            }
            else
            {
                MessageBox.Show("This name is already taken. Choose a different one, or delete existing character throught Load menu");
            }
        }
Esempio n. 3
0
 private void finish(object sender, EventArgs e)
 {
     currplayer1.save(currplayer1);
     this.Close();
 }