Пример #1
0
 public override void ExecutePickup(EntityController target)
 {
     target.AddHealth(health);
     if (null != pointsModel)
     {
         spawnModel(pointsModel, target.transform.position + (target.transform.up * 2));
     }
     PlaySound();
 }
Пример #2
0
 public IEnumerator HealCoroutine(OutOfCombatHeal healInfo, EntityController entity)
 {
     while (true)
     {
         if ((Time.time > healInfo.TimeSinceLastAttack) &&
             (entity.GetHealth() < entity.GetMaxHealth()) &&
             (Time.time - entity.GetLastTimeAttacked() > healInfo.TimeSinceLastAttack))
         {
             entity.AddHealth(healInfo.HealAmount);
         }
         yield return(new WaitForSeconds(healInfo.TimeBetweenHealTicks));
     }
 }