Beispiel #1
0
    public void SetEffect(UnitEffect new_effect)
    {
        UI_ActionBar_Button_ColorSetting setting = UI_ActionBar_Button_ColorSetting.GetInstance();


        ColorSettingToolTipItem color = new_effect.EffectBonus > 1 ? setting.TT_EFF_Bonus_Active : setting.TT_EFF_Bonus_Inactive;

        BG.sprite = new_effect.TargetMode == UnitEffect.TargetModes.Owner ? Target_Owner : Target_Target;

        m_effect = new_effect;


        if (new_effect.Icon != null)
        {
            Icon.sprite = new_effect.Icon;
            Icon.color  = color.Icon;
        }


        Text.text  = new_effect.GetShortHandle();
        Text.color = color.Text;

        BG.color = color.Background;
    }
Beispiel #2
0
 void SpawnEffectAppliedNotification(UnitEffect effect)
 {
     if (!effect.ShowApplyNotification)
     {
         return;
     }
     EventNotification.SpawnEffectNotification(EffectNotifactionPrefab, EffectNotificationsContainer, effect, effect.GetShortHandle() + " applied");
     EnableUnitUI();
 }
Beispiel #3
0
    void SpawnEffectExpiredNotification(UnitEffect effect)
    {
        if (!effect.ShowRemoveNotification)
        {
            return;
        }

        EventNotification.SpawnEffectNotification(EffectNotifactionPrefab, EffectNotificationsContainer, effect, effect.GetShortHandle() + " removed");
        EnableUnitUI();
    }