private void OnSetGeneralIntoBattleRatio(INoticeBase <int> param) { Debug.Log("OnSetGeneralIntoBattleRatio 1"); BattleData battleData = GetGameData <BattleData>(Consts.D_BATTLE); AIRatioNotice notice = param as AIRatioNotice; notice.Heros = battleData.GetIdleBattleHeros(notice.camp); }
private void OnAIChoosePlayerCardHero(INoticeBase <int> param) { Debug.Log("OnAIChoosePlayerCardHero 1"); HeroNotice notice = param as HeroNotice; AIRatioNotice AIRatioNotice = Pooling <AIRatioNotice> .From(); AIRatioNotice.camp = notice.camp; NotifyModular(Consts.N_SET_GENERAL_INTO_BATTLE_RATIO, AIRatioNotice); NotifyModular(Consts.N_COMMIT_PLAYER_AI, notice); AIRatioNotice.ToPool(); }
private void OnSetGeneralIntoBattleRatio(INoticeBase <int> param) { Debug.Log("OnSetGeneralIntoBattleRatio 2"); AIRatioNotice notice = param as AIRatioNotice; List <BattleHeroController> list = notice.Heros; if (list.Count > 0) { float ratio = list.Count / Consts.CAMP_HERO_MAX * mWeights[0]; mPlayerIntoBattleRatio.Ratio = ratio; mPlayerIntoBattleRatio.Heros = list; } else { } }