Class TLevelInfoList
Unit
Declaration
type TLevelInfoList = class(specialize TObjectList<TLevelInfo>)
Description
Hierarchy
- TObject
- TList
- TObjectList
- TLevelInfoList
Overview
Methods
![]() |
function FindName(const AName: string): TLevelInfo; |
![]() |
procedure LoadFromFiles(const LevelsPath: string); |
![]() |
procedure LoadFromFiles; |
![]() |
procedure AddFromFile(const URL: string); |
![]() |
procedure SortByNumber; |
![]() |
procedure LoadFromConfig(const Config: TCastleConfig); |
![]() |
procedure SaveToConfig(const Config: TCastleConfig); |
Description
Methods
![]() |
function FindName(const AName: string): TLevelInfo; |
|
raises Exception if such Name is not on the list. | |
![]() |
procedure LoadFromFiles(const LevelsPath: string); |
|
Add all available levels found by scanning for level.xml inside data directory. Overloaded version without parameter just looks inside 'castle-data:/'. For the specification of level.xml format see [https://castle-engine.io/creating_data_levels.php] . This should be called after resources (creatures and items) are known, as they may be referenced by level.xml files. So call Resources.LoadFromFiles before calling this (if you want to use any creatures / items at all, of course). All TLevelInfo.Played values are initially set to | |
![]() |
procedure LoadFromFiles; |
![]() |
procedure AddFromFile(const URL: string); |
|
Add a single level information from the XML file at given location. The given XML file must have <level> root element and be written according to https://castle-engine.io/creating_data_levels.php . | |
![]() |
procedure SortByNumber; |
|
Sort by TLevelInfo.Number. Done automatically at the end of LoadFromFiles, you may want to call it explicitly after doing AddFromFile. | |
![]() |
procedure LoadFromConfig(const Config: TCastleConfig); |
|
For all available levels, read their TLevelInfo.Played from config file (like UserConfig). This is useful only if you actually look at TLevelInfo.Played for any purpose (for example, to decide which levels are displayed in the menu). By default, our engine doesn't look at TLevelInfo.Played for anything. | |
![]() |
procedure SaveToConfig(const Config: TCastleConfig); |
|
Save Played properties of every level to a config file (like UserConfig). | |
Generated by PasDoc 0.16.0.
