Klasse BattleshipAppConfig

java.lang.Object
pp.util.config.Config
pp.battleship.BattleshipConfig
pp.battleship.game.singlemode.BattleshipClientConfig
pp.battleship.client.BattleshipAppConfig

public class BattleshipAppConfig extends pp.battleship.game.singlemode.BattleshipClientConfig
Provides access to the Battleship application configuration. Extends BattleshipClientConfig to include additional properties specific to the client, particularly those related to screen settings and visual customization.

Note: Attributes of this class should not be marked as final to ensure proper functionality when reading from a properties file.

  • Verschachtelte Klassen - Übersicht

    Von Klasse geerbte verschachtelte Klassen/Schnittstellen pp.util.config.Config

    pp.util.config.Config.Property, pp.util.config.Config.Separator
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Creates a default BattleshipAppConfig with predefined values.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    protected Object
    convertToType(String value, Class<?> targetType)
    Converts a string value found in the properties file into an object of the specified type.
    boolean
    Returns whether the game should start in full-screen mode.
    int
    Returns the height of the game view resolution in pixels.
    int
    Returns the width of the game view resolution in pixels.
    boolean
    Returns whether the settings window should be shown for configuring the game.
    boolean
    Returns whether the JME statistics window should be shown in the lower left corner of the screen.
    com.jme3.math.ColorRGBA
    Returns the color of the top text during gameplay as a ColorRGBA object.
    boolean
    Returns whether gamma correction is enabled.
    boolean
    Returns whether full resolution framebuffers should be used on Retina displays.

    Von Klasse geerbte Methoden pp.battleship.game.singlemode.BattleshipClientConfig

    getDelay, getOpponentMap, getOwnMap, getRobotTargets, isSingleMode

    Von Klasse geerbte Methoden pp.battleship.BattleshipConfig

    getMapHeight, getMapWidth, getPort, getShipNums

    Von Klasse geerbte Methoden pp.util.config.Config

    readFrom, readFrom, readFromIfExists, toString

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • BattleshipAppConfig

      public BattleshipAppConfig()
      Creates a default BattleshipAppConfig with predefined values.
  • Methodendetails

    • convertToType

      protected Object convertToType(String value, Class<?> targetType)
      Converts a string value found in the properties file into an object of the specified type. Extends the superclass method to support conversion to ColorRGBA.
      Setzt außer Kraft:
      convertToType in Klasse pp.util.config.Config
      Parameter:
      value - the string value to be converted
      targetType - the target type into which the value string is converted
      Gibt zurück:
      the converted object of the specified type
    • getResolutionWidth

      public int getResolutionWidth()
      Returns the width of the game view resolution in pixels.
      Gibt zurück:
      the width of the game view resolution in pixels
    • getResolutionHeight

      public int getResolutionHeight()
      Returns the height of the game view resolution in pixels.
      Gibt zurück:
      the height of the game view resolution in pixels
    • fullScreen

      public boolean fullScreen()
      Returns whether the game should start in full-screen mode.
      Gibt zurück:
      true if the game should start in full-screen mode; false otherwise
    • useGammaCorrection

      public boolean useGammaCorrection()
      Returns whether gamma correction is enabled. If enabled, the main framebuffer is configured for sRGB colors, and sRGB images are linearized.
      Gibt zurück:
      true if gamma correction is enabled; false otherwise
    • useRetinaFrameBuffer

      public boolean useRetinaFrameBuffer()
      Returns whether full resolution framebuffers should be used on Retina displays. This setting is ignored on non-Retina platforms.
      Gibt zurück:
      true if full resolution framebuffers should be used on Retina displays; false otherwise
    • getShowSettings

      public boolean getShowSettings()
      Returns whether the settings window should be shown for configuring the game.
      Gibt zurück:
      true if the settings window should be shown; false otherwise
    • getShowStatistics

      public boolean getShowStatistics()
      Returns whether the JME statistics window should be shown in the lower left corner of the screen.
      Gibt zurück:
      true if the statistics window should be shown; false otherwise
    • getTopColor

      public com.jme3.math.ColorRGBA getTopColor()
      Returns the color of the top text during gameplay as a ColorRGBA object.
      Gibt zurück:
      the color of the top text during gameplay