Beispiel #1
0
 public static CoupleMng CreateNew()
 {
     if (GameCenter.coupleMng == null)
     {
         CoupleMng coupleMng = new CoupleMng();
         coupleMng.Init();
         return(coupleMng);
     }
     else
     {
         GameCenter.coupleMng.UnRegist();
         GameCenter.coupleMng.Init();
         return(GameCenter.coupleMng);
     }
 }
Beispiel #2
0
    protected void Init(MainPlayerInfo _mainplayerInfo)
    {
        mainPlayerInfo = _mainplayerInfo;
        functionList.Clear();
        hasApplySubData = false;
        MsgHander.Regist(0xB107, S2C_OnChangePos);
        MsgHander.Regist(0xB104, S2C_OnLoginInGame);
        // MsgHander.Regist(0xD204, S2C_CollectResult);
        MsgHander.Regist(0xD01D, S2C_OnBaseValueChange);
        //MsgHander.Regist(0xD329, S2C_VIPResult);
        MsgHander.Regist(0xD442, S2C_ReinNum);
        MsgHander.Regist(0xB105, S2C_CurServerTime);
        //MsgHander.Regist(0xD779,S2C_ServerStartGuide);
        MsgHander.Regist(0xC105, S2C_UpdateFuncReward);
        //物品管理类
        inventoryMng            = InventoryMng.CreateNew(this);
        GameCenter.inventoryMng = inventoryMng;
        //宠物管理类
        //petMng = PetMng.CreateNew(this);
        //GameCenter.petMng = petMng;
        //新排行榜管理类
        newRankingMng            = NewRankingMng.CreateNew();
        GameCenter.newRankingMng = newRankingMng;
        //法宝管理类
        magicWeaponMng            = MagicWeaponMng.CreateNew(this);
        GameCenter.magicWeaponMng = magicWeaponMng;
        //成就管理类
        achievementMng            = AchievementMng.CreateNew(this);
        GameCenter.achievementMng = achievementMng;
        //七天奖励管理类
        sevenDayMng            = SevenDayMng.CreateNew();
        GameCenter.sevenDayMng = sevenDayMng;
        //首冲大礼管理类
        firstChargeBonusMng            = FirstChargeBonusMng.CreateNew();
        GameCenter.firstChargeBonusMng = firstChargeBonusMng;
        //翅膀管理类
        wingMng            = WingMng.CreateNew(this);
        GameCenter.wingMng = wingMng;

        rebornMng            = RebornMng.CreateNew(this);
        GameCenter.rebornMng = rebornMng;

//		sceneAnimMng = SceneAnimMng.CreateNew();
//		GameCenter.sceneAnimMng = sceneAnimMng;

        //随从管理类
        mercenaryMng            = MercenaryMng.CreateNew();
        GameCenter.mercenaryMng = mercenaryMng;

        newMountMng            = NewMountMng.CreateNew();
        GameCenter.newMountMng = newMountMng;

        guildMng            = GuildMng.CreateNew(this);
        GameCenter.guildMng = guildMng;

        dailyMustDoMng            = DailyMustDoMng.CreateNew();
        GameCenter.dailyMustDoMng = dailyMustDoMng;

        taskMng            = TaskMng.CreateNew(this);
        GameCenter.taskMng = taskMng;

        teamMng            = TeamMng.CreateNew();
        GameCenter.teamMng = teamMng;
        // 好友管理类 by朱素云
        friendsMng            = FriendsMng.CreateNew();
        GameCenter.friendsMng = friendsMng;
        // 等级奖励管理类 by朱素云
        rankRewardMng            = RankRewardMng.CreateNew();
        GameCenter.rankRewardMng = rankRewardMng;
        // 修行管理类 by朱素云
        practiceMng            = PracticeMng.CreateNew();
        GameCenter.practiceMng = practiceMng;
        // 仙侣管理类 by朱素云
        coupleMng            = CoupleMng.CreateNew();
        GameCenter.coupleMng = coupleMng;
        // 周卡管理类 by朱素云
        weekCardMng            = WeekCardMng.CreateNew();
        GameCenter.weekCardMng = weekCardMng;
        // 爱心礼包管理类 by朱素云
        lovePackageMng            = LovePackageMng.CreateNew();
        GameCenter.lovePackageMng = lovePackageMng;
        // 结义管理类 by朱素云
        swornMng            = SwornMng.CreateNew();
        GameCenter.swornMng = swornMng;
        //副本选择管理类
        dungeonMng            = DungeonMng.CreateNew();
        GameCenter.dungeonMng = dungeonMng;
        // 火焰山战场管理类 by朱素云
        battleFightMng            = BattleFightMng.CreateNew();
        GameCenter.battleFightMng = battleFightMng;



        //技能升级管理类
        skillMng            = SkillMng.CreateNew(ref skillMng);
        GameCenter.skillMng = skillMng;

        //称号管理类 by 贺丰
        titleMng            = TitleMng.CreateNew(ref titleMng);
        GameCenter.titleMng = titleMng;

        //邮箱管理类
        mailBoxMng            = XXMailMng.CreateNew();
        GameCenter.mailBoxMng = mailBoxMng;

        endLessTrialsMng            = EndLessTrialsMng.CreateNew();
        GameCenter.endLessTrialsMng = endLessTrialsMng;

        //聊天管理类
        chatMng            = ChatMng.CreateNew();
        GameCenter.chatMng = chatMng;


//        GameCenter.taskMng.updateSingleTask += TaskOpenFunction;
        GameCenter.taskMng.OnTaskGuideUpdateEvent         += TaskProcessOpenFunction;
        GameCenter.taskMng.OnTaskFinishedGuideUpdateEvent += TaskFinishedOpenFunction;

        equipmentTraningMng             = EquipmentTrainingMng.CreateNew();
        GameCenter.equipmentTrainingMng = equipmentTraningMng;

        //时装管理类
        fashionMng            = FashionMng.CreateNew(this);
        GameCenter.fashionMng = fashionMng;

        //商店管理类
        shopMng            = ShopMng.CreateNew(this);
        GameCenter.shopMng = shopMng;
        //仙盟商店管理类
        guildShopMng            = GuildShopMng.CreateNew(this);
        GameCenter.guildShopMng = guildShopMng;
        //仙盟技能管理类
        guildSkillMng            = GuildSkillMng.CreateNew(this);
        GameCenter.guildSkillMng = guildSkillMng;

        //下载管理类
        downloadBonusMng            = DownloadBonusMng.CreateNew(this);
        GameCenter.downloadBonusMng = downloadBonusMng;


        //商城管理类
        newMallMng            = NewMallMng.CreateNew(this);
        GameCenter.newMallMng = newMallMng;


        //物品购买
        buyMng            = BuyMng.CreateNew(this);
        GameCenter.buyMng = buyMng;

        //交易
        tradeMng            = TradeMng.CreateNew(this);
        GameCenter.tradeMng = tradeMng;


        //充值管理
        rechargeMng            = RechargeMng.CreateNew(this);
        GameCenter.rechargeMng = rechargeMng;

        //市场
        marketMng            = MarketMng.CreateNew(this);
        GameCenter.marketMng = marketMng;

        //铸魂
        castSoulMng            = CastSoulMng.CreateNew(this);
        GameCenter.castSoulMng = castSoulMng;

        //在线奖励
        onlineRewardMng            = OnlineRewardMng.CreateNew(this);
        GameCenter.onlineRewardMng = onlineRewardMng;

        //仙域争霸
        guildFightMng            = GuildFightMng.CreateNew(this);
        GameCenter.guildFightMng = guildFightMng;

        //精彩活动
        wdfActiveMng            = WdfActiveMng.CreateNew();
        GameCenter.wdfActiveMng = wdfActiveMng;

        //开服贺礼
        openServerRewardMng            = OpenServerRewardMng.CreateNew(this);
        GameCenter.openServerRewardMng = openServerRewardMng;

        //复活
        resurrectionMng            = ResurrectionMng.CreateNew(this);
        GameCenter.resurrectionMng = resurrectionMng;
        //小助手
        littleHelperMng            = LittleHelperMng.CreateNew(this);
        GameCenter.littleHelperMng = littleHelperMng;

        //藏宝阁管理类
        treasureHouseMng            = TreasureHouseMng.CreateNew();
        GameCenter.treasureHouseMng = treasureHouseMng;

        //皇室宝箱管理类
        royalTreasureMng            = RoyalTreasureMng.CreateNew();
        GameCenter.royalTreasureMng = royalTreasureMng;

        //奇缘系统管理类
        newMiracleMng         = MiracleMng.CreateNew();
        GameCenter.miracleMng = newMiracleMng;

        //二冲系统管理类
        newTwoChargeMng         = TwoChargeMng.CreateNew();
        GameCenter.twoChargeMng = newTwoChargeMng;


        bossChallengeMng            = BossChallengeMng.CreateNew();
        GameCenter.bossChallengeMng = bossChallengeMng;

        activityMng            = ActivityMng.CreateNew();
        GameCenter.activityMng = activityMng;
        //单人副本多人副本的管理类
        duplicateMng            = DuplicateMng.CreateNew();
        GameCenter.duplicateMng = duplicateMng;
        //竞技场管理类
        arenaMng            = ArenaMng.CreateNew();
        GameCenter.arenaMng = arenaMng;
        //新手引导管理类
        noviceGuideMng            = NoviceGuideMng.CreateNew();
        GameCenter.noviceGuideMng = noviceGuideMng;

        //离线经验管理类
        offLineRewardMng            = OffLineRewardMng.CreateNew();
        GameCenter.offLineRewardMng = offLineRewardMng;
        //VIP管理类
        vipMng            = VipMng.CreateNew();
        GameCenter.vipMng = vipMng;
        //宝藏活动的管理类
        treasureTroveMng            = TreasureTroveMng.CreateNew();
        GameCenter.treasureTroveMng = treasureTroveMng;
        //七日挑战管理类
        sevenChallengeMng            = SevenChallengeMng.CreateNew();
        GameCenter.sevenChallengeMng = sevenChallengeMng;
        //走马灯 by hmj
        GameCenter.uIMng.GenGUI(GUIType.MERRYGOROUND, true);
        //MsgHander.Regist(0xD804,S2C_GuideSeqencingList);
        MsgHander.Regist(0xD786, S2C_ServerStartTime);
        MsgHander.Regist(0xD70A, S2C_StartCameraFocus);
        MsgHander.Regist(0xD70B, S2C_EndCameraFocus);

        IsUpdateQuestionList = true;
        serverStartTiem      = DateTime.Now;
    }