예제 #1
0
 private void XYEndTB_TextChanged(object sender, TextChangedEventArgs e)
 {
     SCM.TBTreating(XEndTB, XSizeTB);
     SCM.TBTreating(YEndTB, YSizeTB);
     if (XEndTB.Text != "" && YEndTB.Text != "")
     {
         game.End = new cell(SCM.X(XEndTB), SCM.Y(YEndTB));
     }
 }
예제 #2
0
        //logic events begin
        private void Player1TB_TextChanged(object sender, TextChangedEventArgs e)
        {
            SCM.TBTreating(XPlayer1TB, game.MapSizeX);
            SCM.TBTreating(YPlayer1TB, game.MapSizeY);
            SCM.TBTreating(LifePlayer1TB, MaxPlayer1Life);

            if (XPlayer1TB.Text != "" && YPlayer1TB.Text != "" && LifePlayer1TB.Text != "")
            {
                game.InitPlayer1(SCM.X(XPlayer1TB), SCM.Y(YPlayer1TB), SCM.Int32(LifePlayer1TB));
            }
        }
예제 #3
0
 private void MapTB_TextChanged(object sender, TextChangedEventArgs e)
 {
     SCM.TBTreating(XMapTB, XSizeTB);
     SCM.TBTreating(YMapTB, YSizeTB);
     if (XMapTB.Text != "" && YMapTB.Text != "")
     {
         CostMapTB.Text = game.GetMapCell(SCM.X(XMapTB), SCM.Y(YMapTB)).Price.ToString();
     }
     if (XMapTB.Text == "" && YMapTB.Text == "")
     {
         CostMapTB.Clear();
     }
 }
예제 #4
0
 private void CostMapTB_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (XMapTB.Text != "" && YMapTB.Text != "")
     {
         SCM.TBTreating(CostMapTB, MaxCost);
         if (CostMapTB.Text != "")
         {
             game.InitMapCell(SCM.X(XMapTB), SCM.Y(YMapTB), SCM.Int32(CostMapTB));
             graphicTBs[SCM.X(XMapTB), SCM.Y(YMapTB)].Text = CostMapTB.Text;
         }
     }
     else
     {
         CostMapTB.Clear();
     }
 }
예제 #5
0
 private void LifePlayer2TB_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (XPlayer2TB.Text != "" && YPlayer2TB.Text != "")
     {
         SCM.TBTreating(LifePlayer2TB, MaxPlayer2Life);
         if (LifePlayer2TB.Text != "")
         {
             game.InitPlayer2(Convert.ToInt32(Player2CurrentChipLB.SelectedValue), SCM.X(XPlayer2TB), SCM.Y(YPlayer2TB), SCM.Int32(LifePlayer2TB));
         }
     }
     else
     {
         LifePlayer2TB.Clear();
     }
 }