Example #1
0
 public void Confirm_YES()//确定研发技术
 {
     if (globalObj.MinusMoney(cost))
     {
         if (tech_name == "改装船厂")
         {
             dockyard.SetActive(true);
             Destroy(shipyard_cube);
             dockyard.GetComponent <Animator>().Play("shipyard_main");
             ChangeMoney(globalObj.GetMoney());
             globalObj.Add_building("shipyard");
             confirm.SetActive(false);
         }
         else
         {
             SaveTechData(tech_name);
             ChangeMoney(globalObj.GetMoney());
             confirm.SetActive(false);
         }
     }
     else
     {
         confirm.transform.Find("warning_text").GetComponent <Text>().text = "你没有足够的金钱!!";
     }
 }