Example #1
0
 public void Init(ResLevelCfgInfo levelCfg, int difficult)
 {
     this.LevelName           = StringHelper.UTF8BytesToString(ref levelCfg.szName);
     this.LevelDesignFileName = StringHelper.UTF8BytesToString(ref levelCfg.szDesignFileName);
     if ((levelCfg.szArtistFileName != null) && (levelCfg.szArtistFileName.Length > 0))
     {
         this.LevelArtistFileName = StringHelper.UTF8BytesToString(ref levelCfg.szArtistFileName);
     }
     this.iLevelID   = levelCfg.iCfgID;
     this.iChapterNo = levelCfg.iChapterId;
     this.bLevelNo   = levelCfg.bLevelNo;
     this.difficulty = difficult;
     this.LevelType  = (RES_LEVEL_TYPE)levelCfg.iLevelType;
     if (this.LevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_GUIDE)
     {
         this.GameType = COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE;
     }
     this.PassDialogId          = levelCfg.iPassDialogId;
     this.PreDialogId           = levelCfg.iPreDialogId;
     this.FailureDialogId       = levelCfg.iFailureDialogId;
     this.AIModeType            = (RES_LEVEL_HEROAITYPE)levelCfg.iHeroAIType;
     this.bSoulGrow             = levelCfg.bSoulGrow;
     this.dwAttackOrder         = levelCfg.dwAttackOrderID;
     this.baseReviveTime        = (int)levelCfg.dwReviveTime;
     this.dynamicPropertyConfig = levelCfg.dwDynamicPropertyCfg;
     this.isPVPMode             = this.LevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_PVP;
     this.miniMapPath           = StringHelper.UTF8BytesToString(ref levelCfg.szThumbnailPath);
     this.bigMapPath            = StringHelper.UTF8BytesToString(ref levelCfg.szBigMapPath);
     this.mapPath             = StringHelper.UTF8BytesToString(ref levelCfg.szMapPath);
     this.mapWidth            = levelCfg.iMapWidth;
     this.mapHeight           = levelCfg.iMapHeight;
     this.bigMapWidth         = levelCfg.iBigMapWidth;
     this.bigMapHeight        = levelCfg.iBigMapHeight;
     this.musicStartEvent     = StringHelper.UTF8BytesToString(ref levelCfg.szMusicStartEvent);
     this.musicEndEvent       = StringHelper.UTF8BytesToString(ref levelCfg.szMusicEndEvent);
     this.ambientSoundEvent   = StringHelper.UTF8BytesToString(ref levelCfg.szAmbientSoundEvent);
     this.bankResName         = StringHelper.UTF8BytesToString(ref levelCfg.szBankResourceName);
     this.horizonEnableMethod = (Horizon.EnableMethod)levelCfg.bEnableHorizon;
     if (this.isPVPMode)
     {
         this.horizonEnableMethod = Horizon.EnableMethod.EnableAll;
     }
     this.canAutoAI = levelCfg.bIsOpenAutoAI != 0;
     this.MapBuffs  = levelCfg.astMapBuffs;
     if ((difficult >= 1) && (difficult < (levelCfg.RecommendPower.Length + 1)))
     {
         this.recommendCombatEft = levelCfg.RecommendPower[difficult - 1];
     }
     this.bCameraFlip = false;
 }
        public override void Init()
        {
            base.Init();
            Horizon.EnableMethod horizonEnableMethod = Singleton <BattleLogic> .instance.GetCurLvelContext().m_horizonEnableMethod;

            this._enabled = (horizonEnableMethod == Horizon.EnableMethod.EnableAll || horizonEnableMethod == Horizon.EnableMethod.EnableMarkNoMist);
            if (this._enabled)
            {
                this._campMarkers = new HorizonMarker.CampMarker[2];
                for (int i = 0; i < this._campMarkers.Length; i++)
                {
                    this._campMarkers[i] = new HorizonMarker.CampMarker(this, BattleLogic.MapOtherCampType(this.actor.TheActorMeta.ActorCamp, i));
                }
            }
            else
            {
                this._campMarkers = null;
            }
            this._jungleHideMarkCount = 0;
            this._needTranslucent     = false;
        }
Example #3
0
        public override void Init()
        {
            base.Init();
            Horizon.EnableMethod horizonEnableMethod = Singleton <BattleLogic> .instance.GetCurLvelContext().horizonEnableMethod;

            this._enabled = (horizonEnableMethod == Horizon.EnableMethod.EnableAll) || (horizonEnableMethod == Horizon.EnableMethod.EnableMarkNoMist);
            if (this._enabled)
            {
                this._campMarkers = new CampMarker[2];
                for (int i = 0; i < this._campMarkers.Length; i++)
                {
                    this._campMarkers[i] = new CampMarker();
                }
            }
            else
            {
                this._campMarkers = null;
            }
            this._jungleHideMarkCount = 0;
            this._needTranslucent     = false;
        }
Example #4
0
 public void InitPveData(ResLevelCfgInfo levelCfg, int difficult)
 {
     this.m_isMobaType          = false;
     this.m_pveLevelInfo        = levelCfg;
     this.m_selectHeroType      = enSelectType.enMutile;
     this.m_levelName           = this.m_pveLevelInfo.szName;
     this.m_levelDesignFileName = this.m_pveLevelInfo.szDesignFileName;
     if ((this.m_pveLevelInfo.szArtistFileName != null) && (this.m_pveLevelInfo.szArtistFileName.Length > 0))
     {
         this.m_levelArtistFileName = this.m_pveLevelInfo.szArtistFileName;
     }
     this.m_mapWidth            = this.m_pveLevelInfo.iMapWidth;
     this.m_mapHeight           = this.m_pveLevelInfo.iMapHeight;
     this.m_bigMapWidth         = this.m_pveLevelInfo.iBigMapWidth;
     this.m_bigMapHeight        = this.m_pveLevelInfo.iBigMapHeight;
     this.m_miniMapPath         = this.m_pveLevelInfo.szThumbnailPath;
     this.m_bigMapPath          = this.m_pveLevelInfo.szBigMapPath;
     this.m_mapID               = this.m_pveLevelInfo.iCfgID;
     this.m_chapterNo           = this.m_pveLevelInfo.iChapterId;
     this.m_levelNo             = this.m_pveLevelInfo.bLevelNo;
     this.m_levelDifficulty     = difficult;
     this.m_pveLevelType        = (RES_LEVEL_TYPE)this.m_pveLevelInfo.iLevelType;
     this.m_horizonEnableMethod = (Horizon.EnableMethod) this.m_pveLevelInfo.bEnableHorizon;
     this.m_isMobaType          = this.m_pveLevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_PVP;
     if (this.m_isMobaType)
     {
         this.m_horizonEnableMethod = Horizon.EnableMethod.EnableAll;
     }
     this.m_passDialogId          = this.m_pveLevelInfo.iPassDialogId;
     this.m_preDialogId           = this.m_pveLevelInfo.iPreDialogId;
     this.m_failureDialogId       = this.m_pveLevelInfo.iFailureDialogId;
     this.m_heroAiType            = (RES_LEVEL_HEROAITYPE)this.m_pveLevelInfo.iHeroAIType;
     this.m_soulGrow              = this.m_pveLevelInfo.bSoulGrow;
     this.m_baseReviveTime        = (int)this.m_pveLevelInfo.dwReviveTime;
     this.m_dynamicPropertyConfig = this.m_pveLevelInfo.dwDynamicPropertyCfg;
     this.m_miniMapPath           = this.m_pveLevelInfo.szThumbnailPath;
     this.m_bigMapPath            = this.m_pveLevelInfo.szBigMapPath;
     this.m_mapWidth              = this.m_pveLevelInfo.iMapWidth;
     this.m_mapHeight             = this.m_pveLevelInfo.iMapHeight;
     this.m_mapFowScale           = 1f;
     this.m_bigMapFowScale        = 1f;
     this.m_musicStartEvent       = this.m_pveLevelInfo.szMusicStartEvent;
     this.m_musicEndEvent         = this.m_pveLevelInfo.szMusicEndEvent;
     this.m_ambientSoundEvent     = this.m_pveLevelInfo.szAmbientSoundEvent;
     this.m_musicBankResName      = this.m_pveLevelInfo.szBankResourceName;
     this.canAutoAI              = this.m_pveLevelInfo.bIsOpenAutoAI != 0;
     this.m_mapBuffs             = this.m_pveLevelInfo.astMapBuffs;
     this.m_isShowTrainingHelper = this.m_pveLevelInfo.bShowTrainingHelper > 0;
     this.m_soulID                       = this.m_pveLevelInfo.dwSoulID;
     this.m_soulAllocId                  = this.m_pveLevelInfo.dwSoulAllocId;
     this.m_starDetail                   = this.m_pveLevelInfo.astStarDetail;
     this.m_reviveInfo                   = this.m_pveLevelInfo.astReviveInfo;
     this.m_reviveTimeMax                = this.m_pveLevelInfo.bReviveTimeMax;
     this.m_loseCondition                = this.m_pveLevelInfo.iLoseCondition;
     this.m_extraSkillId                 = this.m_pveLevelInfo.iExtraSkillId;
     this.m_extraSkill2Id                = this.m_pveLevelInfo.iExtraSkill2Id;
     this.m_extraPassiveSkillId          = this.m_pveLevelInfo.iExtraPassiveSkillId;
     this.m_isCanRightJoyStickCameraDrag = this.m_pveLevelInfo.bSupportCameraDrag > 0;
     this.m_isCameraFlip                 = false;
     this.m_pvpPlayerNum                 = this.m_pveLevelInfo.bMaxAcntNum;
 }