コード例 #1
0
 public void onInventClick()
 {
     if (!Game.Player.isInvented(selectedInvention) && Game.Player.sciencePoints.get() >= selectedInvention.getCost().get())
     {
         Game.Player.invent(selectedInvention);
         inventButton.interactable = false;
         MainCamera.topPanel.Refresh();
         if (MainCamera.buildPanel.isActiveAndEnabled)
         {
             MainCamera.buildPanel.Refresh();
         }
         if (MainCamera.politicsPanel.isActiveAndEnabled)
         {
             MainCamera.politicsPanel.Refresh();
         }
         if (MainCamera.factoryPanel.isActiveAndEnabled)
         {
             MainCamera.factoryPanel.Refresh();
         }
         //Hide();
         //show();
         Refresh();
     }
 }