TTronGameData Class

Unit: uTronGameData
System.TObject
  uGameData.TGameData
    uTronGameData.TTronGameData
type TTronGameData = class(tgamedata)

The TTronGameData type exposes the following members.

Show:
 NameDescription
Create

Used to create a new instance of this class. It's better to use TGameData.DefaultGameData if you don't need to manage complex things on your game data. (Overrides uGameData.TGameData.Create .)

Destroy

Never call it, use only "Free" or "FreeAndNil" if you called the Create() method to get a new instance of this game. (Overrides uGameData.TGameData.Destroy .)

Top
Show:
 NameDescription
FileName

The FileName for this game (no path, no extension) if opened by LoadFromFile(WithAName) or it has been saved by SaveToFile(WithAName) (Inherited from uGameData.TGameData .)

HasChanged

Returns True if a game parameter has changed since last Clear(), LoadXXX() or SaveXXX() (Inherited from uGameData.TGameData .)

IsPaused

Returns True after a load() or a pausegame() Returns False after a Clear() (Inherited from uGameData.TGameData .)

IsPlaying

Returns True after a StartANewGame() or ContinueGame() Returns False after a PauseGame() or StopGame() (Inherited from uGameData.TGameData .)

Level

It's the current player level (Inherited from uGameData.TGameData .)

NbLives

It's the current player lives number level (Inherited from uGameData.TGameData .)

Path

Path to the folder where games will be saved (Inherited from uGameData.TGameData .)

Players

Score

It's the current player score (Inherited from uGameData.TGameData .)

UserPseudo

It's the current player pseudo (if it has been asked) (Inherited from uGameData.TGameData .)

Top
Show:
 NameDescription
Clear

Used to clean current instance and reset all properties and fields to their default values (Inherited from uGameData.TGameData .)

ContinueGame

Start the game without clearing the game data before Use it to continue a game after a pause or loading it (Inherited from uGameData.TGameData .)

Current

DefaultGameData

Get the instance of current game data as a T instance. (Overrides uGameData.TGameData.DefaultGameData<T> .)

DefaultGameData<T>

Overloaded. Get the instance of current game data as a T instance. (Inherited from uGameData.TGameData .)

LoadFromFile

Used to load the game data from a file after clearing the instance. (Inherited from uGameData.TGameData .)

LoadFromStream

Used to load the game data from a stream. (Inherited from uGameData.TGameData .)

PauseGame

Call it when you pause (stop temporary) a game and want to continue it in the future (Inherited from uGameData.TGameData .)

SaveToFile

Used to save current game data to a file (Inherited from uGameData.TGameData .)

SaveToStream

Used to save current game data to a stream (Inherited from uGameData.TGameData .)

StartANewGame

Start the game after clearing the game data (Overrides uGameData.TGameData.StartANewGame .)

StopGame

Call it when you stop a game (Inherited from uGameData.TGameData .)

Top
Show:
 NameDescription
FHasChanged

(Inherited from uGameData.TGameData .)

FIsPaused

(Inherited from uGameData.TGameData .)

FIsPlaying

(Inherited from uGameData.TGameData .)

FPath

(Inherited from uGameData.TGameData .)

Grid

Top