示例#1
0
 public HUD(Game game, GameOptions gameOptions)
 {
     this.Game        = game;
     this.gameOptions = gameOptions;
     gameResults      = new GameResults();
     healthBar        = new HUDBar(HEALTH_BAR_BACKGROUND_COLOR, HEALTH_BAR_BAR_COLOR, HEALTH_BAR_FRAME, "Health:");
     staminaBar       = new HUDBar(STAMINA_BAR_BACKGROUND_COLOR, STAMINA_BAR_BAR_COLOR, STAMINA_BAR_FRAME, "Stamina:");
     messageQueue     = new HUDTextTimedQueue(MESSAGE_QUEUE_BASEPOINT);
 }
示例#2
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;
        }
示例#3
0
 public HUD(Game game, GameOptions gameOptions)
 {
     this.Game = game;
     this.gameOptions = gameOptions;
     gameResults = new GameResults();
     healthBar = new HUDBar(HEALTH_BAR_BACKGROUND_COLOR, HEALTH_BAR_BAR_COLOR, HEALTH_BAR_FRAME, "Health:");
     staminaBar = new HUDBar(STAMINA_BAR_BACKGROUND_COLOR, STAMINA_BAR_BAR_COLOR, STAMINA_BAR_FRAME, "Stamina:");
     messageQueue = new HUDTextTimedQueue(MESSAGE_QUEUE_BASEPOINT);
 }