void OnDestroy() { if (m_logic != null) { m_logic.Release(); m_logic = null; } EventService.Instance.GetEvent <AddEnemyInBattleEvent>().Unsubscribe(EnemyAddOrRemoveTrigger); }
// 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); }
public AAbility(EAbility type) { this._data = new AbilityData(); this._logic = new AbilityLogic(); this._type = type; }
private void Awake() { Instance = this; }