private void InitControl() { _battleModel.AddListener(BattleEvent.ENEMY_INIT, OnEnemyInit); _battleModel.AddListener(BattleEvent.BOUT_UPDATE, OnBoutUpdate); _battleModel.AddListener(BattleEvent.ENEMY_DEAD, OnEnemyDead); Message.AddListener(MsgType.ATTACK_HIT, OnAttackHit); }
private void InitControl() { _manager = new BattleManager(); Stage.inst.onTouchMove.Add(OnTouchMove); btnEndTurn.onClick.Add(OnEndTurnClick); _lstMessagePool.Clear(); TimeManager.Add(UPDATE_TIME, OnBattleUpdate, true); _battleModel.AddListener(BattleEvent.DRAW_ONE_CARD, OnDrawOneCard); _battleModel.AddListener(BattleEvent.MOVE_HAND_TO_USED, OnMoveHandToUsed); _battleModel.AddListener(BattleEvent.HAND_CARD_CONSUME, OnHandCardConsume); _battleModel.AddListener(BattleEvent.HAND_CARD_EXHAUST, OnHandCardConsume); _battleModel.AddListener(BattleEvent.ARMOR_CHANGE, OnArmorChange); _battleModel.AddListener(BattleEvent.COST_CHANGE, OnCostChange); _battleModel.AddListener(BattleEvent.ENEMY_INIT, OnEnemyInit); _battleModel.AddListener(BattleEvent.ENEMY_HP_UPDATE, OnEnemyHpUpdate); _battleModel.AddListener(BattleEvent.ENEMY_DEAD, OnEnemyDead); _battleModel.AddListener(BattleEvent.ENEMY_ACTION_UPDATE, OnActionUpdate); _battleModel.AddListener(BattleEvent.ENEMY_ARMOR_CHANGE, OnEnemyArmorChange); _battleModel.AddListener(BattleEvent.ENEMY_BUFF_ADD, OnEnemyBuffAdd); _battleModel.AddListener(BattleEvent.ENEMY_BUFF_UPDATE, OnEnemyBuffUpdate); _battleModel.AddListener(BattleEvent.ENEMY_BUFF_REMOVE, OnEnemyBuffRemove); _battleModel.AddListener(BattleEvent.BOUT_UPDATE, OnBoutUpdate); _battleModel.AddListener(BattleEvent.SELF_HP_UPDATE, OnSelfHpUpdate); _battleModel.AddListener(BattleEvent.SELF_BUFF_ADD, OnSelfBuffAdd); _battleModel.AddListener(BattleEvent.SELF_BUFF_UPDATE, OnSelfBuffUpdate); _battleModel.AddListener(BattleEvent.SELF_BUFF_REMOVE, OnSelfBuffRemove); Message.AddListener(MsgType.DO_ATTACK, OnDoAttack); Message.AddListener(MsgType.SHOW_HIT_EFFECT, OnShowHitEffect); Message.AddListener(MsgType.BATTLE_WIN, OnBattleWin); Message.AddListener(MsgType.FIGHTER_ROLL_OVER, OnFighterRollOver); Message.AddListener(MsgType.FIGHTER_ROLL_OUT, OnFighterRollOut); }