コード例 #1
0
 public void StartWave(WaveDetails wave)
 {
     Wave++;
     foreach (Tile tile in world.GetTiles("Portal"))
     {
         SummonWave(wave, (Building)tile);
     }
 }
コード例 #2
0
        public void BasicWaveStart()
        {
            List <IUnit> tempUnits = new List <IUnit>();

            tempUnits.Add(new HeadlessHorseman("Headless Horseman", new Vector2(1), (Wave * 100) + 100, (Wave * 100) + 100, new Vector2(318, 120), BaseUnitState.Idle, TextureValue.HeadlessHorseman, Color.Red, TextureValue.HeadlessHorseman, 1, TeamStats));
            tempUnits.Add(new Mage("Mage", new Vector2(1), (Wave * 50) + 100, (Wave * 100) + 100, new Vector2(318, 113), BaseUnitState.Idle, TextureValue.Mage, Color.Red, TextureValue.Mage, projectileManager, 10, TeamStats));

            foreach (IUnit unit in tempUnits)
            {
                ((HostileMob)unit).SetTeam(CommandComponent.ID + 1);
            }
            WaveDetails wave = new WaveDetails(tempUnits);

            StartWave(wave);
        }
コード例 #3
0
 private void SummonWave(WaveDetails wave, Building building)
 {
     units.AddRange(wave.GetUnits(building));
     world.AddMobs(units);
 }