コード例 #1
0
 public override void Initialize(ContentManager content, WaveManager manager)
 {
     infiniteAmmoModeOn = true;
     infiniteFoodModeOn = true;
     isTutorialWave = true;
     waveSize = wavesize;
     spawnTimings = new List<double>(waveSize);
     enemiesToSpawn = new List<Enemy>(waveSize);
     lootList = new List<Loot>(waveSize);
     enemiesToSpawn.Insert(0, new Enemy1());
     spawnTimings.Insert(0, baseTime + 0 * interval);
     enemiesToSpawn.Insert(1, new Enemy1());
     spawnTimings.Insert(1, 2 * interval);
     enemiesToSpawn.Insert(2, new Enemy1());
     spawnTimings.Insert(2, 3.5 * interval);
     enemiesToSpawn.Insert(3, new Enemy1());
     spawnTimings.Insert(3, 5 * interval);
     enemiesToSpawn.Insert(waveSize - 1, new HeadShotTest());
     spawnTimings.Insert(waveSize - 1, baseTime + 6.5 * interval);
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     //lootList.Add(new FoodLoot(1, content));
     lootList.Add(new MachineGunAmmoLoot(5, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new MachineGunAmmoLoot(5, content));
     openingTextFilename = "Content//Text//TutorialWave1Open.txt";
     layout = new FoxholeLayout();
     helpTexture = content.Load<Texture2D>("Graphics\\Tutorial1Help");
     helpTextureController = content.Load<Texture2D>("Graphics\\Tutorial1HelpController");
     base.Initialize(content, manager);
 }
コード例 #2
0
ファイル: Player.cs プロジェクト: pel5xq/InFoxholesGame
 public void Initialize(ContentManager Content, int startingFood, int HUDPosition, WaveManager manager)
 {
     foodSupply = startingFood;
     hudSeat = HUDPosition;
     foodTexture = Content.Load<Texture2D>("Graphics\\Food");
     waveManager = manager;
 }
コード例 #3
0
ファイル: Wave2.cs プロジェクト: pel5xq/InFoxholesGame
 public override void Initialize(ContentManager content, WaveManager manager)
 {
     infiniteAmmoModeOn = false;
     infiniteFoodModeOn = false;
     isTutorialWave = false;
     waveSize = wavesize;
     spawnTimings = new List<double>(waveSize);
     enemiesToSpawn = new List<Enemy>(waveSize);
     lootList = new List<Loot>(waveSize);
     for (int i = 0; i < waveSize; i++)
     {
         if (i % 4 == 0) enemiesToSpawn.Insert(i, new HeadShotTest());
         else enemiesToSpawn.Insert(i, new Enemy1());
         spawnTimings.Insert(i, baseTime + i * interval);
     }
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new FoodLoot(1, content));
     lootList.Add(new MachineGunAmmoLoot(10, content));
     lootList.Add(new FoodLoot(1, content));
     lootList.Add(new MachineGunAmmoLoot(4, content));
     lootList.Add(new SniperAmmoLoot(4, content));
     lootList.Add(new MachineGunAmmoLoot(6, content));
     lootList.Add(new FoodLoot(1, content));
     lootList.Add(new SniperAmmoLoot(3, content));
     lootList.Add(new SniperAmmoLoot(1, content));
     openingTextFilename = "Content//Text//Wave2Open.txt";
     layout = new TowerLayout();
     base.Initialize(content, manager);
 }
コード例 #4
0
ファイル: OpeningWave3.cs プロジェクト: pel5xq/InFoxholesGame
 public override void Initialize(ContentManager content, WaveManager manager)
 {
     infiniteAmmoModeOn = false;
     infiniteFoodModeOn = true;
     isTutorialWave = false;
     waveSize = wavesize;
     spawnTimings = new List<double>(waveSize);
     enemiesToSpawn = new List<Enemy>(waveSize);
     lootList = new List<Loot>(waveSize);
     enemiesToSpawn.Insert(0, new ParachuteEnemy());
     spawnTimings.Insert(0, baseTime + 0 * interval);
     enemiesToSpawn.Insert(1, new HumanShieldEnemy());
     spawnTimings.Insert(1, baseTime + 1 * interval);
     //enemiesToSpawn.Insert(2, new HeadShotTest());
     enemiesToSpawn.Insert(2, new Enemy1());
     spawnTimings.Insert(2, baseTime + 1 * interval);
     enemiesToSpawn.Insert(3, new Enemy1());
     spawnTimings.Insert(3, baseTime + 2 * interval);
     enemiesToSpawn.Insert(4, new HeadShotTest());
     spawnTimings.Insert(4, baseTime + 3 * interval);
     enemiesToSpawn.Insert(5, new Enemy1());
     spawnTimings.Insert(5, baseTime + 3 * interval);
     enemiesToSpawn.Insert(6, new HumanShieldEnemy());
     spawnTimings.Insert(6, baseTime + 6 * interval);
     enemiesToSpawn.Insert(7, new Enemy1());
     spawnTimings.Insert(7, baseTime + 7 * interval);
     enemiesToSpawn.Insert(8, new HeadShotTest());
     spawnTimings.Insert(8, baseTime + 8 * interval);
     enemiesToSpawn.Insert(9, new HeadShotTest());
     spawnTimings.Insert(9, baseTime + 9 * interval);
     //enemiesToSpawn.Insert(10, new HeadShotTest());
     enemiesToSpawn.Insert(10, new ParachuteEnemy());
     spawnTimings.Insert(10, baseTime + 9 * interval);
     enemiesToSpawn.Insert(11, new HeadShotTest());
     spawnTimings.Insert(11, baseTime + 9 * interval);
     enemiesToSpawn.Insert(12, new HumanShieldEnemy());
     spawnTimings.Insert(12, baseTime + 11 * interval);
     enemiesToSpawn.Insert(13, new HumanShieldEnemy());
     spawnTimings.Insert(13, baseTime + 11 * interval);
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new MachineGunAmmoLoot(10, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new MachineGunAmmoLoot(4, content));
     lootList.Add(new SniperAmmoLoot(4, content));
     lootList.Add(new MachineGunAmmoLoot(6, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new SniperAmmoLoot(3, content));
     lootList.Add(new SniperAmmoLoot(1, content));
     lootList.Add(new MachineGunAmmoLoot(6, content));
     lootList.Add(new SniperAmmoLoot(2, content));
     lootList.Add(new SniperAmmoLoot(1, content));
     lootList.Add(new MachineGunAmmoLoot(6, content));
     openingTextFilename = "Content//Text//OpeningWave3Open.txt";
     layout = new TowerLayout();
     base.Initialize(content, manager);
 }
コード例 #5
0
ファイル: Crosshair.cs プロジェクト: pel5xq/InFoxholesGame
 public void Initialize(ContentManager Content, WaveManager manager)
 {
     CrosshairTexture = Content.Load<Texture2D>("Graphics\\Crosshair");
     aimHelpTexture = Content.Load<Texture2D>("Graphics\\AimHelper");
     Position = new Vector2(-1*CrosshairTexture.Width, -1*CrosshairTexture.Height);
     State = 0;
     waveManager = manager;
     aimingAngle = -100;
 }
コード例 #6
0
ファイル: Wave.cs プロジェクト: pel5xq/InFoxholesGame
 public virtual void Initialize(ContentManager content, WaveManager manager)
 {
     enemiesOnScreen = new List<Enemy>(waveSize);
     contentManager = content;
     waveStartTime = 0;
     openingText = getTextFromFile(openingTextFilename);
     waveManager = manager;
     layout.Initialize(content);
 }
コード例 #7
0
ファイル: MachineGun.cs プロジェクト: pel5xq/InFoxholesGame
 public override void Initialize(ContentManager Content, SpriteBatch spriteBatch, int HUDPosition, int ammosupply, WaveManager manager)
 {
     milliCooldown = millicooldown;
     clipSize = clipsize;
     clipSupply = clipsize;
     reloadCooldown = reloadLength;
     WeaponTexture = Content.Load<Texture2D>("Graphics\\BAR");
     WeaponTextureHud = Content.Load<Texture2D>("Graphics\\BARHud");
     bullet = Content.Load<Texture2D>("Graphics\\BARAmmo");
     shotSound = Content.Load<SoundEffect>("Music\\ak47.wav");
     reloadSound = Content.Load<SoundEffect>("Music\\Sniper_Fire_Reload.wav");
     base.Initialize(Content, spriteBatch, HUDPosition, ammosupply, manager);
 }
コード例 #8
0
 public virtual void Initialize(ContentManager content, int HUDPosition, int numLives, WaveManager manager)
 {
     waveManager = manager;
     hudSeat = HUDPosition;
     scavengers = new List<Scavenger>(numLives);
     scavengers.Insert(0, new Scavenger());
     scavengers[0].Initialize(content, 0,  hudSeat, true, this);
     activeScavenger = 0;
     for (int i = 1; i < numLives; i++)
     {
         scavengers.Insert(i, new Scavenger());
         scavengers[i].Initialize(content, i, hudSeat, false, this);
     }
 }
コード例 #9
0
ファイル: LadderWave3.cs プロジェクト: pel5xq/InFoxholesGame
 public override void Initialize(ContentManager content, WaveManager manager)
 {
     infiniteAmmoModeOn = false;
     infiniteFoodModeOn = true;
     isTutorialWave = false;
     waveSize = wavesize;
     spawnTimings = new List<double>(waveSize);
     enemiesToSpawn = new List<Enemy>(waveSize);
     lootList = new List<Loot>(waveSize);
     enemiesToSpawn.Insert(0, new HeadShotTest());
     spawnTimings.Insert(0, baseTime + 0 * interval);
     lootList.Add(new SniperAmmoLoot(2, content));
     openingTextFilename = "Content//Text//LadderWave3.txt";
     layout = new LadderLayout();
     base.Initialize(content, manager);
 }
コード例 #10
0
        public override void Initialize(ContentManager content, WaveManager manager)
        {
            infiniteAmmoModeOn = true;
            infiniteFoodModeOn = true;
            isTutorialWave = true;
            spawnTimings = new List<double>(waveSize);
            enemiesToSpawn = new List<Enemy>(waveSize);
            lootList = new List<Loot>(waveSize);

            enemiesToSpawn.Insert(0, new DeadEnemy1());
            spawnTimings.Insert(0, 0);
            lootList.Add(new SniperAmmoLoot(2, content));
            openingTextFilename = "Content//Text//TutorialWave2Open.txt";
            layout = new FoxholeLayout();
            helpTexture = content.Load<Texture2D>("Graphics\\Tutorial2Help");
            helpTextureController = content.Load<Texture2D>("Graphics\\Tutorial2HelpController");
            base.Initialize(content, manager);
        }
コード例 #11
0
 public override void Initialize(ContentManager content, WaveManager manager)
 {
     infiniteAmmoModeOn = false;
     infiniteFoodModeOn = true;
     isTutorialWave = false;
     waveSize = wavesize;
     spawnTimings = new List<double>(waveSize);
     enemiesToSpawn = new List<Enemy>(waveSize);
     lootList = new List<Loot>(waveSize);
     enemiesToSpawn.Insert(0, new Enemy1());
     spawnTimings.Insert(0, baseTime);
     enemiesToSpawn.Insert(1, new HeadShotTest());
     spawnTimings.Insert(1, baseTime + 1.5 * interval);
     enemiesToSpawn.Insert(2, new HeadShotTest());
     spawnTimings.Insert(2, baseTime + 2.5 * interval);
     enemiesToSpawn.Insert(3, new Enemy1());
     spawnTimings.Insert(3, baseTime + 3 * interval);
     enemiesToSpawn.Insert(4, new HeadShotTest());
     spawnTimings.Insert(4, baseTime + 4.5 * interval);
     enemiesToSpawn.Insert(5, new DogEnemy());
     spawnTimings.Insert(5, baseTime + 5.5 * interval);
     //enemiesToSpawn.Insert(2, new HeadShotTest());
     enemiesToSpawn.Insert(6, new DogEnemy());
     spawnTimings.Insert(6, baseTime + 6.5 * interval);
     enemiesToSpawn.Insert(7, new DogEnemy());
     spawnTimings.Insert(7, baseTime + 6.5 * interval + 1000);
     enemiesToSpawn.Insert(8, new DogEnemy());
     spawnTimings.Insert(8, baseTime + 6.5 * interval + 2000);
     lootList.Add(new MachineGunAmmoLoot(12, content));
     lootList.Add(new SniperAmmoLoot(7, content));
     lootList.Add(new MachineGunAmmoLoot(14, content));
     lootList.Add(new SniperAmmoLoot(8, content));
     lootList.Add(new MachineGunAmmoLoot(12, content));
     lootList.Add(new SniperAmmoLoot(0, content));
     lootList.Add(new MachineGunAmmoLoot(0, content));
     lootList.Add(new SniperAmmoLoot(0, content));
     lootList.Add(new SniperAmmoLoot(0, content));
     openingTextFilename = "Content//Text//FoxholeDemoWave2.txt";
     layout = new FoxholeLayout();
     base.Initialize(content, manager);
 }
コード例 #12
0
ファイル: Weapon.cs プロジェクト: pel5xq/InFoxholesGame
 public virtual void Initialize(ContentManager Content, SpriteBatch spriteBatch, int HUDPosition, int ammosupply, WaveManager manager)
 {
     pixel = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
     burst = Content.Load<Texture2D>("Graphics\\rifleBurst");
     pixel.SetData(new[] { Color.White });
     ShotPoint = Vector2.Zero;
     lastShotMilli = 0;
     reloadMilli = 0;
     waveManager = manager;
     hudSeat = HUDPosition;
     ammoSupply = ammosupply - clipSize;
     emptyClipSound = (Content.Load<SoundEffect>("Music\\Click2.wav")).CreateInstance();
 }
コード例 #13
0
ファイル: MainGame.cs プロジェクト: pel5xq/InFoxholesGame
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     font = Content.Load<SpriteFont>("Fonts\\Font");
     player = new Player();
     crosshair = new Crosshair();
     sniperRifle = new SniperRifle();
     machineGun = new MachineGun();
     weapon = sniperRifle;
     sniperRifle.isSelected = true;
     machineGun.isSelected = false;
     waveManager = new WaveManager();
     scavengerManager = new ScavengerManager();
     currentScavengeCommand = 0;
     victoryTexture = new AnimatedSprite(Content.Load<Texture2D>("Graphics\\Victory"), 3, 2, animationSpeed);
     base.Initialize();
 }
コード例 #14
0
 public void Initialize(ContentManager content, WaveManager waveManager)
 {
     manager = waveManager;
     menNames = sampleNames;
     State = 0;
     conversationIsFinished = false;
     deathThisRound = false;
     lastNumScavengers = -1;
     portraits = new List<Texture2D>();
     portraits.Add(content.Load<Texture2D>("Graphics\\Andy"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Evan"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Bill"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Paul"));
     talkToButtons = new List<Button>();
     talkToButtonsHover = new List<bool>();
     talkAboutButtons = new List<Button>();
     talkAboutButtonsHover = new List<bool>();
     possibleResponses = new List<String>();
     endConversationButton = new Button(endConversationL, endConversationR, endConversationText, endConversationOffset);
     endConversationHover = false;
 }