Exemplo n.º 1
0
 public Wave(int waveNumber, int numOfEnemies, Player player, Level level, Texture2D enemyTexture)
 {
     this.waveNumber = waveNumber;
     this.numOfEnemies = numOfEnemies;
     this.player = player;
     this.level = level;
     this.enemyTexture = enemyTexture;
 }
Exemplo n.º 2
0
 public Player(Level level, Texture2D towerTexture, Texture2D bulletTexture, ContentManager content)
 {
     this.level = level;
     this.towerTexture = towerTexture;
     this.bulletTexture = bulletTexture;
     this.content = content;
     upgradeTexture = content.Load<Texture2D>("upgrade");
 }
Exemplo n.º 3
0
 public Player(Level level, Texture2D[] towerTextures, Texture2D bulletTexture, ContentManager content)
 {
     this.level = level;
     this.towerTextures = towerTextures;
     this.bulletTexture = bulletTexture;
     this.content = content;
     upgradeTexture = content.Load<Texture2D>("upgrade");
     upgradeButton = new UpgradeButton();
 }
Exemplo n.º 4
0
 //public Wave(int waveNumber, int numOfEnemies, Player player, Level level, Texture2D enemyTexture)
 public Wave(int waveNumber, int numOfEnemies, Player player, Level level, Texture2D[] enemyTextureList, float[] enemyHealthList)
 {
     this.waveNumber = waveNumber;
     this.numOfEnemies = numOfEnemies;
     this.player = player;
     this.level = level;
     //this.enemyTexture = enemyTexture;
     this.enemyTexture = enemyTextureList;
     this.enemyHealthList = enemyHealthList;
 }
Exemplo n.º 5
0
        public WaveManager(Player player, Level level, int numberOfWaves, Texture2D[] enemyTexture)
        {
            this.numberOfWaves = numberOfWaves;
            this.enemyTexture = enemyTexture;
            this.level = level;

            for (int i = 0; i < numberOfWaves; i++)
            {
                int initialNumberOfEnemies = 6;
                int numberModifier = i + 1;
                Wave wave = new Wave(i, initialNumberOfEnemies * numberModifier, player, level, enemyTexture[i%2]);
                waves.Enqueue(wave);
            }

            StartNextWave();
        }