Class GameInfo

java.lang.Object
All Implemented Interfaces:
ICustomPropertyProvider

public class GameInfo
extends CustomPropertyProvider
The GameInfo class contains basic information about a LITIENGINE game. The information can be accessed via Game.getInfo() and the infrastructure also internally uses this information e.g. to setup the main window of the Game by providing an appropriate title.

It should be the first thing that you do in you application entry point to setup or load this information. Note that it's possible to keep this information in an XML file and load it up by calling Game.setInfo(String).

See Also:
Game.info(), Game.setInfo(String)
  • Constructor Details

    • GameInfo

      public GameInfo()
      Initializes a new instance of the GameInfo class.
  • Method Details

    • getCompany

      public java.lang.String getCompany()
      Gets the company that created the game.
      Returns:
      The company that created the game.
    • getDescription

      public java.lang.String getDescription()
      Gets a textual description that explains what the game is all about.
      Returns:
      The game's description.
    • getWebsite

      public java.lang.String getWebsite()
      Gets the web site of this game project.
      Returns:
      The web site of the game.
    • getWebsiteURL

      public java.net.URL getWebsiteURL()
      Gets the getWebsite() as an URL object that can be used to further process the information. (e.g. the web site can be opened in the browser).
      Returns:
      The game's web site as URL
      See Also:
      URL, getWebsite()
    • getDevelopers

      public java.lang.String[] getDevelopers()
      Gets the developers of the game. This can e.g. be used for credits.
      Returns:
      The game's developers.
    • getName

      public java.lang.String getName()
      Gets the name of the LITIENGINE game.
      Returns:
      The game's name.
    • getPublisher

      public java.lang.String getPublisher()
      Gets the publisher of the game.
      Returns:
      The game's publisher.
    • getSubTitle

      public java.lang.String getSubTitle()
      Gets the sub title of the game. It is basically an addendum to the getName().
      Returns:
      The game's sub title.
    • getVersion

      public java.lang.String getVersion()
      Gets the version of the game.
      Returns:
      The game's version.
    • getTitle

      public java.lang.String getTitle()
      Gets the title of the game.
      This will be used as the title of the game's window by default and includes the core information about the game:
      • The game's name
      • The game's version
      • opt. The game's subtitle
      Returns:
      The game's title.
      See Also:
      getName(), getSubTitle(), getVersion()
    • setCompany

      public void setCompany​(java.lang.String company)
      Sets the company that created the game.
      Parameters:
      company - The company that created the game.
    • setDescription

      public void setDescription​(java.lang.String description)
      Sets the game's description. This can be seen as additional information about the game and will not be part of the game's title.
      Parameters:
      description - The game's description.
      See Also:
      getTitle()
    • setDevelopers

      public void setDevelopers​(java.lang.String... developers)
      Sets the game's developers.
      Parameters:
      developers - The game's developers.
    • setName

      public void setName​(java.lang.String name)
      Sets the game's name.
      This is the most basic information about a game and will be part of the game's title.
      Parameters:
      name - The game's name.
      See Also:
      getTitle()
    • setSubTitle

      public void setSubTitle​(java.lang.String subTitle)
      Sets the game's sub title.
      This is basically an addendum to the game's name and will also be part of the game's title.
      Parameters:
      subTitle - The game's sub title.
      See Also:
      getName(), getTitle()
    • setVersion

      public void setVersion​(java.lang.String version)
      Sets the game's version.
      This is a textual representation of the game's version and will also be part of the game's title.
      Examples for good semantic version strings:
      • v0.1.0
      • 0.1.5.2
      • v1.0.0-RC1
      • v0.0.1-alpha
      Parameters:
      version - The game's version.
      See Also:
      getTitle()
    • setWebsite

      public void setWebsite​(java.lang.String website)
      Sets the game's web site.
      Parameters:
      website - The game's web site.