Example #1
0
    public override void UseAbilityPassive()
    {
        Sprite permanentImmunity = Resources.Load <Sprite>("BuffIcons/PermanentImmunity");
        Sprite unluckyAkroma     = Resources.Load <Sprite>("BuffIcons/UnluckyAkroma");

        hero = GetComponentInParent <HeroManager>();

        buffPanel = hero.gameObject.GetComponentInChildren <BuffPanel>();
        //apply effect
        hero.hasPermanentImmunity = true;
        //add icon
        buffPanel.AddIcon("PermanentImmunity", permanentImmunity, 0);

        List <HeroManager> enemies = GameManager.Instance.EnemyHeroList(hero);

        foreach (HeroManager enemy in enemies)
        {
            enemy.chance -= chanceReduction;

            //AddIcon
            BuffPanel buffPanelEnemy = enemy.gameObject.GetComponentInChildren <BuffPanel>();
            buffPanelEnemy.AddIcon("UnluckyAkroma", unluckyAkroma, 0);
        }
        base.UseAbilityPassive();
    }    //UsePassive
Example #2
0
 public void AddIcon()
 {
     buffPanel.AddIcon(buff.buff.ToString(), buffIcon, duration);
 }