public override void ExecutePickup(EntityController target) { target.AddHealth(health); if (null != pointsModel) { spawnModel(pointsModel, target.transform.position + (target.transform.up * 2)); } PlaySound(); }
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)); } }