Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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
            {
            }
        }