Class:DataModel

From OpenBlox
Jump to: navigation, search
Other languages:
English
DataModel
uncreatable
Inheritance
ServiceProvider
Instance

All OpenBlox games have a singleton DataModel Instance which provides, as a ServiceProvider, access to all the game services. It is designated in scripts by the variables Game and game.

Properties

Methods

void SetTitle(string title)

This method sets the title of the game window to the value provided by title.[1]

string GetTitle()

This method returns the title of the game window. [2]

boolean IsLoaded()

This method returns true if the DataModel is loaded, otherwise false. Currently, this method is a stub. [3]

string GetMessage()

This method returns the status message of the DataModel. [4]

void SetMessage(string title)

This method sets the status message of the DataModel to title. [5]

void ClearMessage()

This method clears the status message of the DataModel. [6]

void Shutdown()

This method shuts down the DataModel, and causes the game to exit. [7]

double GetFPS()

This method returns the last recorded FPS (frames per second). On the server, this will always return -1. [8]

Events

Loaded()

This event is fired when the DataModel is loaded. This will never fire on servers, as scripts will not run on servers until the DataModel is loaded.

References

  1. DataModel.cpp, line 60.
  2. Ibid., line 82.
  3. Ibid., line 91.
  4. Ibid., line 109.
  5. Ibid., line 118.
  6. Ibid., line 126.
  7. Ibid., line 133.
  8. Ibid., line 168.