Exemplo n.º 1
0
 public Wave(WaveBase waveBase)
 {
     Mobs = new List <MobileEntity>();
     foreach (string mob in waveBase.Mobs)
     {
         Mobs.Add(mobMaker.CreateMob(mob, new Vector2(0, -100)));
     }
     script    = MoveScriptMaker.CreateMoveScript(waveBase.Movescript, Mobs, waveBase.WillFire);
     StartTime = waveBase.StartTime * Constants.FPS;
     Active    = true;
 }
Exemplo n.º 2
0
        internal static List <Wave> GetWaves(PhaseBase phaseBase)
        {
            WaveList    waveList = JsonConvert.DeserializeObject <WaveList>(FileReader.GetDataFromFile(phaseBase.Name));
            List <Wave> waves    = new List <Wave>();

            foreach (WaveInfo waveInfo in waveList.Waves)
            {
                WaveDetails waveDetails = JsonConvert.DeserializeObject <WaveDetails>(FileReader.GetDataFromFile(waveInfo.Name));
                WaveBase    waveBase    = new WaveBase(waveDetails, waveInfo.StartTime + phaseBase.StartTime);
                waves.Add(CreateWave(waveBase));
            }
            return(waves);
        }
Exemplo n.º 3
0
 internal static Wave CreateWave(WaveBase waveBase)
 {
     return(new Wave(waveBase));
 }