Class GameInfo

All Implemented Interfaces:

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.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.
      The company that created the game.
    • getDescription

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

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

      public 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).
      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.
      The game's developers.
    • getName

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

      public java.lang.String getPublisher()
      Gets the publisher of the game.
      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().
      The game's sub title.
    • getVersion

      public java.lang.String getVersion()
      Gets the version of the game.
      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
      The game's title.
      See Also:
      getName(), getSubTitle(), getVersion()
    • setCompany

      public void setCompany​(java.lang.String company)
      Sets the company that created the game.
      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.
      description - The game's description.
      See Also:
    • setDevelopers

      public void setDevelopers​(java.lang.String... developers)
      Sets the game's developers.
      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.
      name - The game's name.
      See Also:
    • 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.
      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
      • v1.0.0-RC1
      • v0.0.1-alpha
      version - The game's version.
      See Also:
    • setWebsite

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