Exemplo n.º 1
0
 public void plantSeed(Plant currentPlant)
 {
     Plant.Type hilightType = seeds.GetSeedType(hilightCode);
     if (currentPlant.type != Plant.Type.None)
     {
         if (currentPlant.mature)
         {
             /*if(PlayerFruitEater.Usable(currentPlant.type))
              * {
              *  PlayerFruitEater.Eat(currentPlant.type);
              *  currentPlant.Collect();
              * }
              * else
              * {*/
             InventoryManager.instance.AddFruit(currentPlant.type);
             currentPlant.Collect();
             //}
         }
         else if (!currentPlant.watered)
         {
             currentPlant.Water();
             FindObjectOfType <Player>().CostHealth(waterCost);
         }
     }
     else if (currentPlant.type == Plant.Type.None && hilightType != Plant.Type.None)
     {
         //Debug.Log(hilightType);
         InventoryManager.instance.UseSeed(hilightType);
         currentPlant.PlantSeed(hilightType);
     }
 }