Exemple #1
0
 public void ApplyEffect(Item item)
 {
     if (item.itemEffect == Effect.HEAL)
     {
         bunny.increaseHealth(item.amount);
     }
     if (item.itemEffect == Effect.SPEED)
     {
         StartCoroutine(SpeedPickup(item.amount));
     }
     if (item.itemEffect == Effect.REDUCEBLEED)
     {
         StartCoroutine(ReduceBleedSpeed(item.amount));
     }
     Debug.Log("Health: " + bunny.getHealth() + ", Speed: " + bunny.speed);
     item.gameObject.SetActive(false);
 }