Package pp.battleship.client
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
KonstruktorenKonstruktorBeschreibungCreates a defaultBattleshipAppConfigwith predefined values. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected ObjectconvertToType(String value, Class<?> targetType) Converts a string value found in the properties file into an object of the specified type.booleanReturns whether the game should start in full-screen mode.intReturns the height of the game view resolution in pixels.intReturns the width of the game view resolution in pixels.booleanReturns whether the settings window should be shown for configuring the game.booleanReturns whether the JME statistics window should be shown in the lower left corner of the screen.com.jme3.math.ColorRGBAReturns the color of the top text during gameplay as aColorRGBAobject.booleanReturns whether gamma correction is enabled.booleanReturns whether full resolution framebuffers should be used on Retina displays.Von Klasse geerbte Methoden pp.battleship.game.singlemode.BattleshipClientConfig
getDelay, getOpponentMap, getOwnMap, getRobotTargets, isSingleModeVon Klasse geerbte Methoden pp.battleship.BattleshipConfig
getMapHeight, getMapWidth, getPort, getShipNumsVon Klasse geerbte Methoden pp.util.config.Config
readFrom, readFrom, readFromIfExists, toString
-
Konstruktordetails
-
BattleshipAppConfig
public BattleshipAppConfig()Creates a defaultBattleshipAppConfigwith predefined values.
-
-
Methodendetails
-
convertToType
Converts a string value found in the properties file into an object of the specified type. Extends the superclass method to support conversion toColorRGBA.- Setzt außer Kraft:
convertToTypein Klassepp.util.config.Config- Parameter:
value- the string value to be convertedtargetType- 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:
trueif the game should start in full-screen mode;falseotherwise
-
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:
trueif gamma correction is enabled;falseotherwise
-
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:
trueif full resolution framebuffers should be used on Retina displays;falseotherwise
-
getShowSettings
public boolean getShowSettings()Returns whether the settings window should be shown for configuring the game.- Gibt zurück:
trueif the settings window should be shown;falseotherwise
-
getShowStatistics
public boolean getShowStatistics()Returns whether the JME statistics window should be shown in the lower left corner of the screen.- Gibt zurück:
trueif the statistics window should be shown;falseotherwise
-
getTopColor
public com.jme3.math.ColorRGBA getTopColor()Returns the color of the top text during gameplay as aColorRGBAobject.- Gibt zurück:
- the color of the top text during gameplay
-