示例#1
0
 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);
 }
示例#2
0
    public Sprite GetSprite(DebuffTypeEnum type)
    {
        switch (type)
        {
        case DebuffTypeEnum.Lymphozyt:
            return(debuffLymphozyt);

        default:
            return(null);
        }
    }
示例#3
0
    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;
    }
示例#4
0
 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;
 }