예제 #1
0
 private void FormFish_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar >= '1' && e.KeyChar <= '9')
     {
         score += utubo.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxUtuboEsa);
         score += iwasi.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxIwasiEsa);
         score += anko.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxAnkoEsa);
     }
     labelScore.Text = $"{score}";
 }
예제 #2
0
        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar >= '1' && e.KeyChar <= '9')
            {
                score += iwashi.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaS);
                score += utubo.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaL);
                score += ankou.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaM);

                labelScore.Text = "得点:" + score;
            }
        }
예제 #3
0
        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar >= '1' && e.KeyChar <= '9')
            {
                int point = int.Parse(e.KeyChar.ToString());
                score += ankou.Eat(point, pictureBoxBaitM);
                score += iwashi.Eat(point, pictureBoxBaitS);
                score += utubo.Eat(point, pictureBoxBaitL);

                labelScore.Text = score.ToString();
            }
        }