Example #1
0
    /// <summary>
    /// Called to Buff/DeBuff an unit
    /// </summary>
    /// <param name="uniteDamageable">unit target by the methode</param>
    /// <param name="state">use to check if its a buff or a debuff</param>
    private void SetASBuff(IDamageable uniteDamageable, BuffStat state)
    {
        if (uniteDamageable == null)
        {
            Debug.Log("Something wrong happened");
            return;
        }
        switch (state)
        {
        case BuffStat.Buff:
        {
            uniteDamageable.AddBuff("SupportTowerBuffAS", aSModifier, BuffType.ASBoost);
        }
        break;

        case BuffStat.DeBuff:
        {
            uniteDamageable.RemoveBuff("SupportTowerBuffAS", aSModifier, BuffType.ASBoost);
        }
        break;
        }
    }