Resource loading.
More...
|
| integer | LoadSprite (string filename, integer unloadPolicy) |
| | Loads a Sprite resource, returning its Sprite index.
|
| integer | LoadDynamicSprite (string fallbackFolder, string name, integer unloadPolicy) |
| | Loads a Sprite resource via the current Scene's resource folder (else a fallback folder) if a scene list is loaded.
|
| integer | LoadImage (string filename, integer unloadPolicy) |
| | Loads an Image resource, returning its Image index.
|
| integer | LoadModel (string filename, integer unloadPolicy) |
| | Loads Model resource, returning its Model index.
|
| integer | LoadMusic (string filename, integer unloadPolicy) |
| | Loads a Music resource, returning its Music index.
|
| integer | LoadSound (string filename, integer unloadPolicy) |
| | Loads a Sound resource, returning its Sound index.
|
| integer | LoadVideo (string filename, integer unloadPolicy) |
| | Loads a Video resource, returning its Video index.
|
| boolean | FileExists (string filename) |
| | Checks to see if a Resource exists with the given filename.
|
| string | ReadAllText (string path) |
| | Reads all text from the given filename.
|
◆ FileExists()
| boolean Resources.FileExists |
( |
string | filename | ) |
|
Checks to see if a Resource exists with the given filename.
- Parameters
-
| filename | The given filename. |
- Returns
- Returns whether the Resource exists.
◆ LoadDynamicSprite()
| integer Resources.LoadDynamicSprite |
( |
string | fallbackFolder, |
|
|
string | name, |
|
|
integer | unloadPolicy ) |
Loads a Sprite resource via the current Scene's resource folder (else a fallback folder) if a scene list is loaded.
- Parameters
-
| fallbackFolder | Folder to check if the sprite does not exist in the current Scene's resource folder. |
| name | Name of the animation file within the resource folder. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadImage()
| integer Resources.LoadImage |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads an Image resource, returning its Image index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadModel()
| integer Resources.LoadModel |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads Model resource, returning its Model index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadMusic()
| integer Resources.LoadMusic |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads a Music resource, returning its Music index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadSound()
| integer Resources.LoadSound |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads a Sound resource, returning its Sound index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadSprite()
| integer Resources.LoadSprite |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads a Sprite resource, returning its Sprite index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ LoadVideo()
| integer Resources.LoadVideo |
( |
string | filename, |
|
|
integer | unloadPolicy ) |
Loads a Video resource, returning its Video index.
- Parameters
-
| filename | Filename of the resource. |
| unloadPolicy | Whether to unload the resource at the end of the current Scene, or the game end. |
- Returns
- Returns the index of the Resource.
◆ ReadAllText()
| string Resources.ReadAllText |
( |
string | path | ) |
|
Reads all text from the given filename.
- Parameters
-
| path | The path of the resource to read. |
- Returns
- Returns all the text in the resource as a string value if it can be read, otherwise it returns a null value if it cannot be read.