/// <summary>
 /// Dessiner sur scène
 /// </summary>
 /// <param name="menu"></param>
 public virtual void Draw(GameTime gameTime, VO_SelectableMenu menu)
 {
     if (menu != null)
     {
         menu.Draw(gameTime);
     }
 }
Exemple #2
0
 /// <summary>
 /// Draw
 /// </summary>
 /// <param name="gameTime"></param>
 public void Draw(GameTime gameTime, ViewerEnums.BlockType type)
 {
     if (type != ViewerEnums.BlockType.BlockUserControlsAndHideInterfaces)
     {
         Inventory.Draw(gameTime);
     }
     if (LifeBarVisible && PlayableCharactersManager.CurrentPlayerCharacter.ActivateLife)
     {
         _SpriteBatch.Draw(_LifeBarBackground.Image, _LifeBarBackground.Destination, Color.White);
         int percentage = PlayableCharactersManager.CurrentPlayerCharacter.PvAtStart * _LifeBarFull / PlayableCharactersManager.CurrentPlayerCharacter.PvMax;
         _LifeBar.Source = new Rectangle(0, 0, percentage, (int)_LifeBar.Height);
         _SpriteBatch.Draw(_LifeBar.Image, _LifeBar.Destination, Color.White);
     }
     if (EscapeMenuOpened)
     {
         _SpriteBatch.Draw(_EscapeMenuBackground, new Rectangle(0, 0, _EscapeMenuBackground.Width, _EscapeMenuBackground.Height), Color.White * ViewerConstants.MENU_BACKGROUND_TRANSPARENCY);
         _EscapeMenu.Draw(gameTime);
     }
     else if (SaveMenuOpened || LoadMenuOpened)
     {
         _SpriteBatch.Draw(_EscapeMenuBackground, new Rectangle(0, 0, _EscapeMenuBackground.Width, _EscapeMenuBackground.Height), Color.White * ViewerConstants.MENU_BACKGROUND_TRANSPARENCY);
         _GameStatesMenu.Draw(gameTime);
     }
     else if (OptionMenuOpened)
     {
         //_SpriteBatch.Draw(_EscapeMenuBackground.Image, _EscapeMenuBackground.Destination, Color.White);
         //_GameStatesMenu.Draw(app);
     }
 }