示例#1
0
 private void CheckOrganSoldierWave(ref List <ActorPreloadTab> InPreloadListRef, ref ActorMeta InOrganActorMetaRef, ActorStaticData InStaticData)
 {
     if ((InOrganActorMetaRef.ActorType == ActorTypeDef.Actor_Type_Organ) && (InStaticData.TheOrganOnlyInfo.DeadEnemySoldier > 0))
     {
         ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)InStaticData.TheOrganOnlyInfo.DeadEnemySoldier);
         int num = 0;
         while ((dataByKey != null) && (++num < 100))
         {
             for (int i = 0; i < dataByKey.astNormalSoldierInfo.Length; i++)
             {
                 ResSoldierTypeInfo info2 = dataByKey.astNormalSoldierInfo[i];
                 if (info2.dwSoldierID == 0)
                 {
                     break;
                 }
                 ActorMeta actorMeta = new ActorMeta {
                     ActorType = ActorTypeDef.Actor_Type_Monster,
                     ConfigId  = (int)info2.dwSoldierID
                 };
                 this.AddPreloadActor(ref InPreloadListRef, ref actorMeta, 2f, 0);
             }
             dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
         }
     }
 }
示例#2
0
 private void CheckOrganSoldierWave(ref List <ActorPreloadTab> InPreloadListRef, ref ActorMeta InOrganActorMetaRef, ActorStaticData InStaticData)
 {
     if (InOrganActorMetaRef.ActorType == ActorTypeDef.Actor_Type_Organ && InStaticData.TheOrganOnlyInfo.DeadEnemySoldier > 0)
     {
         ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)InStaticData.TheOrganOnlyInfo.DeadEnemySoldier);
         int num = 0;
         while (dataByKey != null && ++num < 100)
         {
             for (int i = 0; i < dataByKey.astNormalSoldierInfo.Length; i++)
             {
                 ResSoldierTypeInfo resSoldierTypeInfo = dataByKey.astNormalSoldierInfo[i];
                 if (resSoldierTypeInfo.dwSoldierID == 0u)
                 {
                     break;
                 }
                 ActorMeta actorMeta  = default(ActorMeta);
                 ActorMeta actorMeta2 = actorMeta;
                 actorMeta2.ActorType = ActorTypeDef.Actor_Type_Monster;
                 actorMeta2.ConfigId  = (int)resSoldierTypeInfo.dwSoldierID;
                 actorMeta            = actorMeta2;
                 this.AddPreloadActor(ref InPreloadListRef, ref actorMeta, 2f, 0);
             }
             dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
         }
     }
 }
示例#3
0
 public SoldierWave(SoldierRegion InRegion, ResSoldierWaveInfo InWaveInfo, int InIndex)
 {
     this.Region   = InRegion;
     this.WaveInfo = InWaveInfo;
     this.Index    = InIndex;
     DebugHelper.Assert((this.Region != null) && (InWaveInfo != null));
     this.isCannonNotified = false;
     this.Reset();
 }
示例#4
0
 public SoldierWave(ResSoldierWaveInfo InWaveInfo)
 {
     this.Region   = null;
     this.WaveInfo = InWaveInfo;
     this.Index    = 0;
     DebugHelper.Assert(InWaveInfo != null);
     this.isCannonNotified           = false;
     this.isNotifiedBigDragonSoldier = false;
     this.Reset();
 }
        public static ListView <SoldierWave> GetWavesForPreLoad(int inWaveId)
        {
            ListView <SoldierWave> listView = new ListView <SoldierWave>();

            DebugHelper.Assert(GameDataMgr.soldierWaveDatabin != null);
            for (ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)inWaveId); dataByKey != null; dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID))
            {
                listView.Add(new SoldierWave(dataByKey));
            }
            return(listView);
        }
示例#6
0
 public void Reset(ResSoldierWaveInfo InWaveInfo)
 {
     this.CurrentIndex      = 0;
     this.TotalCount        = 0;
     this.CurrentCount      = 0;
     this.StatTotalCount    = 0;
     this.SoldierConfigList = InWaveInfo.astNormalSoldierInfo;
     for (int i = 0; i < 5; i++)
     {
         this.StatTotalCount += this.SoldierConfigList[i].dwSoldierNum;
     }
 }
示例#7
0
        private void LoadWave(int theWaveID)
        {
            DebugHelper.Assert(GameDataMgr.soldierWaveDatabin != null);
            ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)theWaveID);
            int num = 0;

            while (dataByKey != null)
            {
                this.Waves.Add(new SoldierWave(this, dataByKey, num++));
                dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
            }
        }
        private void LoadWave(int theWaveID)
        {
            DebugHelper.Assert(GameDataMgr.soldierWaveDatabin != null);
            ResSoldierWaveInfo dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey((uint)theWaveID);
            int num = 0;

            if (dataByKey != null && !this._isInitRouteType)
            {
                this._isInitRouteType = true;
                this.RouteType        = (RES_SOLDIER_ROUTE_TYPE)dataByKey.bRouteType;
            }
            while (dataByKey != null)
            {
                this.Waves.Add(new SoldierWave(this, dataByKey, num++));
                dataByKey = GameDataMgr.soldierWaveDatabin.GetDataByKey(dataByKey.dwNextSoldierWaveID);
            }
        }