コード例 #1
0
ファイル: SBuySmShop.cs プロジェクト: ww386362087/MoyuHero
        public override void Process()
        {
            BattleStageMgr pData = ObjectSelf.GetInstance().BattleStageData;

            if (smshop.Count > 0)
            {
                pData.LoadMysteriousShop(smshop);
            }
            GameEventDispatcher.Inst.dispatchEvent(GameEventID.UI_MysteriousShopBuyReplay, endtype);
        }
コード例 #2
0
ファイル: SSweepBattle.cs プロジェクト: ww386362087/MoyuHero
        public override void Process()
        {
            //CampaignMonsterGroupData pMonsterGroupData = new CampaignMonsterGroupData();
            //byte nGroup = 0;
            //int nIndex = 0;
            //foreach (int value in battleinfo.monstergroup)
            //{
            //    if (nIndex >= GlobalMembers.MAX_MONSTER_GROUP_COUNT || nGroup >= GlobalMembers.MAX_CAMPAIGN_MONSTER_GROUP)
            //        continue;
            //    if (value != 0)
            //    {
            //        pMonsterGroupData.IDs[nGroup, nIndex] = value;
            //        nIndex++;
            //    }
            //    else
            //    {
            //        //用0表示每波怪物的分界标示 [4/1/2015 Zmy]
            //        nIndex = 0;//重设索引
            //        nGroup++;
            //    }
            //}
            //List<int> _indroplist = new List<int>();
            //foreach (int value in battleinfolist)
            //{
            //    _indroplist.Add(value);
            //}
            //ObjectSelf.GetInstance().OnCacheCurrentBattleReward(battleinfo.heroexp, battleinfo.teamexp, battleinfo.tili, 0, _indroplist);
            //ObjectSelf.GetInstance().BattleStageData.CheckSpecialStageData(battleinfo.battleid);

            BattleStageMgr pData = ObjectSelf.GetInstance().BattleStageData;

            //if (smid > 0)
            //{
            //    pData.m_IsOpenSpecialStage = true;
            //    pData.m_SpecialStage.CopyData(smid, time, zhangjie);
            //}

            //if (moheshop.Count > 0)
            //{
            //    ObjectSelf.GetInstance().SetIsOpenSealBox(true);
            //}

            List <BattelInfo> _dropList = new List <BattelInfo>();

            foreach (BattelInfo item in battleinfolist)
            {
                _dropList.Add(item);
            }
//            UnityEngine.Debug.Log("扫荡返回信息");
            DreamFaction.GameEventSystem.GameEventDispatcher.Inst.
            dispatchEvent(DreamFaction.GameEventSystem.GameEventID.U_RapidClearRespond, _dropList);
        }
コード例 #3
0
ファイル: SEndBattle.cs プロジェクト: ww386362087/MoyuHero
        public override void Process()
        {
            ObjectSelf.GetInstance().SetIsOpenSealBox(false);
            if (moheshop.Count > 0)
            {
                ObjectSelf.GetInstance().MoheDataClear();
                ObjectSelf.GetInstance().SetIsOpenSealBox(true);
                int nCount = DataTemplate.GetInstance().m_BossboxTable.getDataCount();
                for (int i = 1; i <= nCount; i++)
                {
                    if (moheshop.ContainsKey(i))
                    {
                        Mohe data = moheshop[i] as Mohe;
                        ObjectSelf.GetInstance().MoheDataAdd(data);
                    }
                }
            }
            BattleStageMgr pData = ObjectSelf.GetInstance().BattleStageData;

            if (smid > 0)
            {
                //UnityEngine.Debug.Log("调试:强制修改smid至1310281000 hashTable:" + smshop.Count);
                //smid = 1310281000;
                //time = 600;
                pData.m_IsOpenSpecialStage = true;
                pData.m_SpecialStage.CopyData(smid, time, zhangjie);



                if (smid > 1299999999 && smid < 1400000000)//特殊关卡
                {
                    //GameEventDispatcher.Inst.dispatchEvent(GameEventID.UI_SpecialStageTips, true);
                    UI_FightControler.Inst.SetIsSpecialStage(true);
                }
                else                                        //触发神秘商店
                {
                    if (smshop.Count > 0)
                    {
                        pData.LoadMysteriousShop(smshop);
                        //GameEventDispatcher.Inst.dispatchEvent(GameEventID.UI_MysteriousShopSpecialTips,true);
                        UI_FightControler.Inst.SetIsMysteriousShop(true);
                    }
                }
            }

            if (endtype == END_OK)
            {
                GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_FightWin);
            }
        }
コード例 #4
0
    public override void InitUIData()
    {
        base.InitUIData();

        timeTextBuilder      = new StringBuilder();
        m_ConfirmItem        = MysteriousItem.GenerateItem(selfTransform.FindChild("ConfirmPanel/Item").gameObject);
        m_CostImage          = selfTransform.FindChild("ConfirmPanel/PlayerWalletText/CostImage").GetComponent <Image>();
        originItem           = selfTransform.FindChild("OriginPanel/OriginItem").gameObject;
        itemListLayout       = selfTransform.FindChild("ItemList/ListLayout").gameObject;
        confirmPanel         = selfTransform.FindChild("ConfirmPanel").gameObject;
        m_CaptionLayoutPoint = selfTransform.FindChild("CaptionLayout");
        battleStageMgr       = ObjectSelf.GetInstance().BattleStageData;

        m_Time = battleStageMgr.m_SpecialStage.m_Time;

        GameEventDispatcher.Inst.addEventListener(GameEventID.UI_MysteriousShopBuyReplay, PayHandler);
    }
コード例 #5
0
    public static bool CheckAndOpenExploreUI()
    {
        BattleStageMgr stageMgr = ObjectSelf.GetInstance().BattleStageData;

        int star    = -1;
        int stageId = DataTemplate.GetInstance().GetGameConfig().getExplore_open_stage();

        if (stageMgr.IsCopyScenePass(stageId, out star))
        {
            UI_HomeControler.Inst.AddUI(UI_ExploreMgr.UI_ResPath);
            return(true);
        }
        else
        {
            InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("explore_open"));
        }

        return(false);
    }
コード例 #6
0
        public override void Process()
        {
            BattleStageMgr pStageData = ObjectSelf.GetInstance().BattleStageData;

            LogManager.LogToFile("start chapter ...");
            foreach (StageInfo item in stages)
            {
                LogManager.LogToFile("start chapter  : " + item.id);
                if (pStageData.m_BattleStageList.ContainsKey(item.id))
                {
                    //初始化关卡数据的章节ID不能重复 [4/7/2015 Zmy]
                    continue;
                    //LogManager.LogError("!!!!!!!!!Error:Init Stages Picec Data Key repeat");
                }
                else
                {
                    pStageData.CopyBattleStageData(item);
                }
            }
        }