Exemple #1
0
 public void OnClick()
 {
     if (RestaurantMain.restMain.currentState == State.upgrades)
     {
         if (utensil.upgradeNum >= Variables.MAX_UTENSIL_UPGRADE)
         {
             Debug.Log("It is the max upgrade already!");
         }
         else
         {
             RestaurantMain.restMain.UtensilUpgradeClicked(this);
         }
     }
     else if (RestaurantMain.restMain.currentState == State.gameplay)
     {
         PlayerScript.AddCookingToolToPlayerQueue(this);
         Vector3 loc = gameObject.transform.position;
         PlayerScript.AddLocation(new Vector3(loc.x - 0.5f, loc.y - 1, loc.z));
     }
 }