Esempio n. 1
0
 public void Register(Unit unit)
 {
     if (m_Event != null)
     {
         m_Event.RegisterListenner(unit, Trigger);
     }
 }
Esempio n. 2
0
    protected override void Regiseter()
    {
        if (m_EndEffectEvent != null)
        {
            m_EndEffectEvent.RegisterListenner(End);
        }

        if (isGameEvent)
        {
            gameEvent.RegisterListenner(TakeEffect);
        }
        else if (isUnitEvent)
        {
            unitEvent.RegisterListenner(m_Status.m_Owner, TakeEffect);
        }
    }
Esempio n. 3
0
    public void RegisterListenner(Unit unit, ListennerTrigger newTrigger)
    {
        if (m_Listenners.ContainsKey(unit))
        {
            m_Listenners[unit] += newTrigger;
        }
        else
        {
            ListennerTrigger trigger = null;
            trigger += newTrigger;

            m_Listenners.Add(unit, trigger);

            if (m_UnitDestroyEvent != null)
            {
                m_UnitDestroyEvent.RegisterListenner(unit, UnitDestroy);
            }
        }
    }
 private void Register()
 {
     //Debug.Log("Register");
     m_StatsChangeEvent.RegisterListenner(m_Owner, CheckDUR);
 }
 protected override void Regiseter()
 {
     //Debug.Log(this + " End Aura Effect Register");
     m_EndAuraEvent.RegisterListenner(m_Status.m_Owner, EndAura);
     //m_EndAuraEvent.Trigger(m_Status.m_Owner);
 }
Esempio n. 6
0
 public virtual void Init(Ability ability)
 {
     m_Owner = ability;
     m_Event.RegisterListenner(m_Owner.m_Owner, Trigger);
 }