コード例 #1
0
 public static void LoadContent(ContentManager contentManager)
 {
     //pistolShotSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolShot");
     //pistolEmptySoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolEmpty");
     //pistolReloadSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolReload");
     pistolAttackTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Weapons/PistolAttack"), new Point(1, 1), new Vector2(-40.0f, 0.0f));
 }
コード例 #2
0
 public static void LoadContent(ContentManager contentManager)
 {
     //shotgunBlastSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunBlast");
     //shotgunEmptySoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunEmpty");
     //shotgunReloadSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunReload");
     shotgunAttackTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Weapons/ShotgunAttack"), new Point(1, 1), new Vector2(-40.0f, 10.0f));
 }
コード例 #3
0
 public static void LoadContent(ContentManager contentManager)
 {
     gasolineCollectableTextureSheet    = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Collectables/gasolineCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     healthCollectableTextureSheet      = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Collectables/healthCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     pistolAmmoCollectableTextureSheet  = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Collectables/pistolAmmoCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     shotgunAmmoCollectableTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Collectables/shotgunAmmoCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     energyCollectableTextureSheet      = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Collectables/energyCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
 }
コード例 #4
0
 public static void LoadContent(ContentManager contentManager)
 {
     Vector2[] offsets = new Vector2[5 * 2];
     for (Int32 index = 0; index < offsets.Length; index++)
     {
         offsets[index] = new Vector2(10, 21);
     }
     zombieDrawTextureSheet      = new TextureSheet(contentManager.Load <Texture2D>(@"Images/ZombieSprite/zombies"), new Point(5, 2), offsets);
     zombieDefenseTextureSheet   = new TextureSheet(contentManager.Load <Texture2D>(@"Images/ZombieSprite/zombiesDefense"), new Point(5, 2), offsets);
     zombieCollisionTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/ZombieSprite/zombiesCollision"), new Point(5, 2), offsets);
     zombieAttackTextureSheet    = new TextureSheet(contentManager.Load <Texture2D>(@"Images/ZombieSprite/zombiesAttack"), new Point(5, 2), offsets);
 }
コード例 #5
0
        public static void LoadContent(ContentManager contentManager)
        {
            Vector2[] offsets = new Vector2[5 * 4];
            for (Int32 index = 0; index < offsets.Length; index++)
            {
                offsets[index] = new Vector2(10, 21);
            }

            // Load Weapons Content
            FistWeapon.LoadContent(contentManager);
            CrowbarWeapon.LoadContent(contentManager);
            ChainsawWeapon.LoadContent(contentManager);
            PistolWeapon.LoadContent(contentManager);
            ShotgunWeapon.LoadContent(contentManager);

            survivorDrawTextureSheet      = new TextureSheet(contentManager.Load <Texture2D>(@"Images/SurvivorSprite/survivor"), new Point(5, 4), offsets);
            survivorAttackTextureSheet    = new TextureSheet(contentManager.Load <Texture2D>(@"Images/SurvivorSprite/survivorAttack"), new Point(5, 4), offsets);
            survivorCollisionTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/SurvivorSprite/survivorCollision"), new Point(5, 4), offsets);
            survivorDefenseTextureSheet   = new TextureSheet(contentManager.Load <Texture2D>(@"Images/SurvivorSprite/survivorDefense"), new Point(5, 4), offsets);
        }
コード例 #6
0
        public static void LoadContent(ContentManager contentManager, int screenWidth, int screenHeight)
        {
            HUDBar.LoadContent(contentManager);
            HUDTextTimedQueue.LoadContent(contentManager);

            pixelTexture                 = contentManager.Load <Texture2D>(@"Images/HUD/Pixel");
            weaponIconsTextureSheet      = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Weapons/WeaponIcons"), new Point(7, 2), Vector2.Zero);
            smallWeaponIconsTextureSheet = new TextureSheet(contentManager.Load <Texture2D>(@"Images/Weapons/SmallWeaponIcons"), new Point(5, 2), Vector2.Zero);

            //Adjust to Display Size
            HUD_TOP_BAR_BACKROUND_FRAME.Width = screenWidth;
            SURVIVAL_TIME_TEXT_POSITION.X     = (float)screenWidth - SURVIVAL_TIME_TEXT_POSITION_OFFSET;
            ZOMBIE_KILLS_TEXT_POSITION.X      = (float)screenWidth - ZOMBIE_KILLS_TEXT_POSITION_OFFSET;
            ZOMBIE_WAVES_TEXT_POSITION.X      = (float)screenWidth - ZOMBIE_WAVES_TEXT_POSITION_OFFSET;
            POINTS_TEXT_POSITION.X            = (float)screenWidth - POINTS_TEXT_POSITION_OFFSET;
            WEAPON_ICON_POSITION.X            = (float)screenWidth - WEAPON_ICON_POSITION_OFFSET.X;
            WEAPON_ICON_POSITION.Y            = (float)screenHeight - WEAPON_ICON_POSITION_OFFSET.Y;
            WEAPON_ROUNDS_POSITION.X          = (float)screenWidth - WEAPON_ROUNDS_POSITION_OFFSET.X;
            WEAPON_ROUNDS_POSITION.Y          = (float)screenHeight - WEAPON_ROUNDS_POSITION_OFFSET.Y;
            WEAPON_CLIPS_POSITION.X           = (float)screenWidth - WEAPON_CLIPS_POSITION_OFFSET.X;
            WEAPON_CLIPS_POSITION.Y           = (float)screenHeight - WEAPON_CLIPS_POSITION_OFFSET.Y;
            WEAPONS_ENABLED_BASEPOINT.Y       = (float)screenHeight - WEAPONS_ENABLED_BASEPOINT_OFFSET;
        }
コード例 #7
0
 public static void LoadContent(ContentManager contentManager)
 {
     Vector2[] offsets = new Vector2[5 * 2];
     for (Int32 index = 0; index < offsets.Length; index++) {
         offsets[index] = new Vector2(10, 21);
     }
     zombieDrawTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/ZombieSprite/zombies"), new Point(5, 2), offsets);
     zombieDefenseTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/ZombieSprite/zombiesDefense"), new Point(5, 2), offsets);
     zombieCollisionTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/ZombieSprite/zombiesCollision"), new Point(5, 2), offsets);
     zombieAttackTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/ZombieSprite/zombiesAttack"), new Point(5, 2), offsets);
 }
コード例 #8
0
ファイル: HUD.cs プロジェクト: bstockus/WarehouseZombieAttack
        public static void LoadContent(ContentManager contentManager, int screenWidth, int screenHeight)
        {
            HUDBar.LoadContent(contentManager);
            HUDTextTimedQueue.LoadContent(contentManager);

            pixelTexture = contentManager.Load<Texture2D>(@"Images/HUD/Pixel");
            weaponIconsTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Weapons/WeaponIcons"), new Point(7, 2), Vector2.Zero);
            smallWeaponIconsTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Weapons/SmallWeaponIcons"), new Point(5, 2), Vector2.Zero);

            //Adjust to Display Size
            HUD_TOP_BAR_BACKROUND_FRAME.Width = screenWidth;
            SURVIVAL_TIME_TEXT_POSITION.X = (float)screenWidth - SURVIVAL_TIME_TEXT_POSITION_OFFSET;
            ZOMBIE_KILLS_TEXT_POSITION.X = (float)screenWidth - ZOMBIE_KILLS_TEXT_POSITION_OFFSET;
            ZOMBIE_WAVES_TEXT_POSITION.X = (float)screenWidth - ZOMBIE_WAVES_TEXT_POSITION_OFFSET;
            POINTS_TEXT_POSITION.X = (float)screenWidth - POINTS_TEXT_POSITION_OFFSET;
            WEAPON_ICON_POSITION.X = (float)screenWidth - WEAPON_ICON_POSITION_OFFSET.X;
            WEAPON_ICON_POSITION.Y = (float)screenHeight - WEAPON_ICON_POSITION_OFFSET.Y;
            WEAPON_ROUNDS_POSITION.X = (float)screenWidth - WEAPON_ROUNDS_POSITION_OFFSET.X;
            WEAPON_ROUNDS_POSITION.Y = (float)screenHeight - WEAPON_ROUNDS_POSITION_OFFSET.Y;
            WEAPON_CLIPS_POSITION.X = (float)screenWidth - WEAPON_CLIPS_POSITION_OFFSET.X;
            WEAPON_CLIPS_POSITION.Y = (float)screenHeight - WEAPON_CLIPS_POSITION_OFFSET.Y;
            WEAPONS_ENABLED_BASEPOINT.Y = (float)screenHeight - WEAPONS_ENABLED_BASEPOINT_OFFSET;
        }
コード例 #9
0
 public static void LoadContent(ContentManager contentManager)
 {
     //pistolShotSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolShot");
     //pistolEmptySoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolEmpty");
     //pistolReloadSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Pistol/pistolReload");
     pistolAttackTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Weapons/PistolAttack"), new Point(1, 1), new Vector2(-40.0f, 0.0f));
 }
コード例 #10
0
 public static void LoadContent(ContentManager contentManager)
 {
     gasolineCollectableTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Collectables/gasolineCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     healthCollectableTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Collectables/healthCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     pistolAmmoCollectableTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Collectables/pistolAmmoCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     shotgunAmmoCollectableTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Collectables/shotgunAmmoCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
     energyCollectableTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Collectables/energyCollectable"), new Point(1, 1), new Vector2(15.0f, 15.0f));
 }
コード例 #11
0
 public static void LoadContent(ContentManager contentManager)
 {
     //shotgunBlastSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunBlast");
     //shotgunEmptySoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunEmpty");
     //shotgunReloadSoundEffect = contentManager.Load<SoundEffect>(@"Sounds/Weapons/Shotgun/shotgunReload");
     shotgunAttackTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/Weapons/ShotgunAttack"), new Point(1, 1), new Vector2(-40.0f, 10.0f));
 }
コード例 #12
0
        public static void LoadContent(ContentManager contentManager)
        {
            Vector2[] offsets = new Vector2[5 * 4];
            for (Int32 index = 0; index < offsets.Length; index++) {
                offsets[index] = new Vector2(10, 21);
            }

            // Load Weapons Content
            FistWeapon.LoadContent(contentManager);
            CrowbarWeapon.LoadContent(contentManager);
            ChainsawWeapon.LoadContent(contentManager);
            PistolWeapon.LoadContent(contentManager);
            ShotgunWeapon.LoadContent(contentManager);

            survivorDrawTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/SurvivorSprite/survivor"), new Point(5, 4), offsets);
            survivorAttackTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/SurvivorSprite/survivorAttack"), new Point(5, 4), offsets);
            survivorCollisionTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/SurvivorSprite/survivorCollision"), new Point(5, 4), offsets);
            survivorDefenseTextureSheet = new TextureSheet(contentManager.Load<Texture2D>(@"Images/SurvivorSprite/survivorDefense"), new Point(5, 4), offsets);
        }