public void ApplyDebuff(Sprite debuffSprite, float duration, DebuffTypeEnum type, float slowAmount, float slowTime) { debuffImage.gameObject.SetActive(true); debuffImage.enabled = true; debuffImage.sprite = debuffSprite; debuffImage.preserveAspect = true; currentDebuff = type; Slow(slowAmount, slowTime); }
public Sprite GetSprite(DebuffTypeEnum type) { switch (type) { case DebuffTypeEnum.Lymphozyt: return(debuffLymphozyt); default: return(null); } }
private IEnumerator ApplySlow(float percentage, float duration) { isSlowed = true; moveSpeed *= percentage; yield return(new WaitForSeconds(duration)); debuffImage.enabled = false; currentDebuff = DebuffTypeEnum.None; moveSpeed = defaultSpeed; isSlowed = false; }
private void Reset() { currentDebuff = DebuffTypeEnum.None; debuffImage.enabled = false; if (defaultMoney != 0) { moneyToAdd = defaultMoney; } currentLevel = 1; healthpoints = defaultHealthpoints; currentHealthpoints = healthpoints; entityState = EntityStateEnum.Alive; ownRenderer.material.color = Color.white; damagedFromTower = null; anim.enabled = true; }