Exemple #1
0
    void OnDestroy()
    {
        if (m_logic != null)
        {
            m_logic.Release();
            m_logic = null;
        }

        EventService.Instance.GetEvent <AddEnemyInBattleEvent>().Unsubscribe(EnemyAddOrRemoveTrigger);
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        if (m_logic == null)
        {
            m_logic = new AbilityLogic();
        }

        UIEventListener.Get(btnExchange).onClick = onExchange;
        UIEventListener.Get(btnCancel).onClick   = onCancel;
        EventService.Instance.GetEvent <AddEnemyInBattleEvent>().Subscribe(EnemyAddOrRemoveTrigger);
        m_logic.Initialize(this);
    }
Exemple #3
0
 public AAbility(EAbility type)
 {
     this._data  = new AbilityData();
     this._logic = new AbilityLogic();
     this._type  = type;
 }
 private void Awake()
 {
     Instance = this;
 }