Class T3DResourceList
Unit
CastleResources
Declaration
type T3DResourceList = class(specialize TFPGObjectList<T3DResource>)
Description
Hierarchy
- TFPGObjectList
- T3DResourceList
Overview
Methods
Description
Methods
 |
function FindName(const AName: string; const NilWhenNotFound: boolean = false): T3DResource; |
Find resource with given T3DResource.Name.
Exceptions raised
Exception
- if not found and NilWhenNotFound = false.
|
 |
procedure LoadFromFiles(const Path: string; const Reload: boolean = false); |
Load all resources (creatures and items) information from resource.xml files found in given Path. Overloaded version without Path just scans the whole ProgramDataPath.
Parameters
- Reload
- If Reload, then we will not clear the initial list contents. Instead, resource.xml files found that refer to the existing T3DResource.Name will cause T3DResource.LoadFromFile call on an existing resource. Using Reload is a nice debug feature, if you want to reload configuration from resource.xml files (and eventually add new resources in new resource.xml files), but you don't want to recreate existing resource instances.
|
 |
procedure LoadFromFiles(const Reload: boolean = false); |
|
 |
procedure LoadResourceFile(const FileName: string; const Reload: boolean = false); |
Load a single resource from resource.xml file. You usually do not want to use this, it's easier to load all your resources in one go by LoadFromFiles call.
Parameters
- Reload
- If
True , and the loaded resource will have a name matching existing T3DResource.Name, we will replace the current resource. Otherwise, we'll make an exception.
|
 |
procedure LoadResources(ParentElement: TDOMElement); |
Reads <prepare_resources> XML element. <prepare_resources> element is an optional child of given ParentElement. Sets current list value with all mentioned required resources (subset of Resources).
|
 |
procedure Release; |
|
Generated by PasDoc 0.12.1 on 2013-02-04 20:26:51
|