Exemple #1
0
 public Wave(Texture2D EnemyTexture, Controller player, int WaveLevel, int EnemyCount, float Speed, int Coins, int HP, int AnimationFrameCount, float AnimationDelay, int AnimationWidth, int AnimationHeight, Map map)
     : this(EnemyTexture, player, WaveLevel, EnemyCount, Speed, Coins, HP, map)
 {
     this.AnimationHeight = AnimationHeight;
     this.AnimationWidth = AnimationWidth;
     this.AnimationDelay = AnimationDelay;
     this.AnimationFrameCount = AnimationFrameCount;
 }
Exemple #2
0
 public Wave(Texture2D EnemyTexture, Controller player, int WaveLevel, int EnemyCount, float Speed, int Coins, int HP, Map map)
 {
     this.enemy = EnemyTexture;
     this.player = player;
     this.waveLevel = WaveLevel;
     this.enemyCount = EnemyCount;
     this.origEnemyCount = EnemyCount;
     this.map = map;
     this.speed = Speed;
     this.coins = Coins;
     this.hp = HP;
 }
Exemple #3
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            map.LoadTextures(this);

            Texture2D[] towerTextures = new Texture2D[] {
                Content.Load<Texture2D>("Towers/ArrowTower"),
                Content.Load<Texture2D>("Towers/CannonTower"),
                Content.Load<Texture2D>("Towers/DualShot"),
                Content.Load<Texture2D>("Towers/SpikeTower")
            };

            Texture2D[] bulletTextures = new Texture2D[] {
                Content.Load<Texture2D>("Bullets/Arrow"),
                Content.Load<Texture2D>("Bullets/Cannonball"),
                Content.Load<Texture2D>("Bullets/WaterBullet"),
                Content.Load<Texture2D>("Bullets/Bullet")
            };

            player = new Controller(map, towerTextures, bulletTextures);

            Texture2D bluehealthbar = Content.Load<Texture2D>("HealthBar/BlueProgressbar");
            Texture2D greenhealthbar = Content.Load<Texture2D>("HealthBar/GreenProgressbar");
            Texture2D healthbarbackground = Content.Load<Texture2D>("HealthBar/ProgressbarBackground");

            //level, amount, speed, coins, hp, framecount, framedelay, framewidth, frameheight
            waveManager = new WaveMgr(map, new Wave[]{
                new Wave("Rats", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Rat"), player, 1, 25, 1.0f, 1, 200, 4, 100.0f, 34, 32, map),
                new Wave("Scorpions", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Scorpion"), player, 2, 25, 1.0f, 1, 42, 8, 100.0f, 31, 31, map),
                new Wave("Beetles", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Beetle"), player, 3, 25, 1.0f, 1, 65, 3, 100.0f, 32, 32, map),
                new Wave("Chitiniacs", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Chitiniac"), player, 4, 25, 1.0f, 1, 75, 8, 100.0f, 31, 31, map),
                new Wave("Cockroaches", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Cockroach"), player, 5, 25, 1.0f, 1, 101, 8, 100.0f, 31, 31, map),

                new Wave("Bandits", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Bandit"), player, 6, 25, 1.5f, 1, 87, 8, 100.0f, 31, 31, map),
                new Wave("Crawlers", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Crawler"), player, 7, 25, 1.0f, 2, 136, 7, 100.0f, 36, 36, map),
                new Wave("Hornets", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Hornet"), player, 8, 25, 1.0f, 1, 158, 8, 100.0f, 31, 31, map),
                new Wave("Ogres", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Ogre"), player, 9, 25, 1.0f, 1, 189, 8, 100.0f, 31, 31, map),
                new Wave("PigKlivers", greenhealthbar, healthbarbackground,  Content.Load<Texture2D>("NPCs/PigKliver"), player, 10, 25, 1.0f, 2, 212, 8, 100.0f, 31, 31, map),

                new Wave("[BOSS] Mage", bluehealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Mage"), player, 10, 1, 1.0f, 45, 2000, 8, 100.0f, 31, 31, map),
                new Wave("Trolls", greenhealthbar, healthbarbackground, Content.Load<Texture2D>("NPCs/Troll"), player, 11, 25, 1.0f, 2, 245, 8, 100.0f, 31, 31, map)
            });

            infoInterface = new Interface(player, Content.Load<Texture2D>("GUI/Toolbar"), Content.Load<Texture2D>("GUI/Toolbar"), Content.Load<SpriteFont>("Fonts/ToolbarFont"), Map.ToMapSpace(new Vector2(map.Width, 0)), Map.ToMapSpace(new Vector2(map.Width, 0)));
            infoInterface.SetCoinInfo(Content.Load<Texture2D>("GUI/Coin"), Map.ToMapSpace(new Vector2(map.Width, 0.1f)), 7, 32, 32, 100.0f);
            infoInterface.SetDummyTexture(new Texture2D(this.graphics.GraphicsDevice, 1, 1));

            Texture2D ButtonBackground = Content.Load<Texture2D>("GUI/ButtonBackground");
            Texture2D ButtonHoverBackground = Content.Load<Texture2D>("GUI/ButtonHoverBackground");
            Texture2D ButtonClickBackground = Content.Load<Texture2D>("GUI/ButtonClickBackground");

            Texture2D StartButtonBackground = Content.Load<Texture2D>("GUI/StartButtonBackground");
            Texture2D StartButtonHoverBackground = Content.Load<Texture2D>("GUI/StartButtonHoverBackground");
            Texture2D StartButtonClickBackground = Content.Load<Texture2D>("GUI/StartButtonClickBackground");
            infoInterface.SetTowerButtonBackgrounds(new Texture2D[] { ButtonBackground, ButtonClickBackground, ButtonHoverBackground }, towerTextures);
            infoInterface.SetStartButton(Content.Load<SpriteFont>("Fonts/StartButtonFont"), new Texture2D[] { StartButtonBackground, StartButtonClickBackground, StartButtonHoverBackground }, waveManager);
            infoInterface.SetTextboxFonts(Content.Load<SpriteFont>("Fonts/TextboxWelcomeFont"), Content.Load<SpriteFont>("Fonts/TextboxFont"));

            endInterface = new EndInterface(infoInterface, player, waveManager, new SpriteFont[] { Content.Load<SpriteFont>("Fonts/EndInterfaceTitle"), Content.Load<SpriteFont>("Fonts/EndInterfaceScoreTitle"), Content.Load<SpriteFont>("Fonts/EndInterfaceTitle"), Content.Load<SpriteFont>("Fonts/StartButtonFont") }, new Texture2D[] { StartButtonBackground, StartButtonClickBackground, StartButtonHoverBackground });
        }
Exemple #4
0
 public Wave(string Name, Texture2D healthbartexture, Texture2D healthbarbackground, Texture2D EnemyTexture, Controller player, int WaveLevel, int EnemyCount, float Speed, int Coins, int HP, int AnimationFrameCount, float AnimationDelay, int AnimationWidth, int AnimationHeight, Map map)
     : this(Name, EnemyTexture, player, WaveLevel, EnemyCount, Speed, Coins, HP, AnimationFrameCount, AnimationDelay, AnimationWidth, AnimationHeight, map)
 {
     this.HealthBarTexture = healthbartexture;
     this.HealthBarBackground = healthbarbackground;
 }
Exemple #5
0
 public Wave(string Name, Texture2D EnemyTexture, Controller player, int WaveLevel, int EnemyCount, float Speed, int Coins, int HP, int AnimationFrameCount, float AnimationDelay, int AnimationWidth, int AnimationHeight, Map map)
     : this(EnemyTexture, player, WaveLevel, EnemyCount, Speed, Coins, HP, AnimationFrameCount, AnimationDelay, AnimationWidth, AnimationHeight, map)
 {
     this.description = Name + " " + HP + "hp, worth " + Coins + "g each.";
 }