|
| static GameObject | PlayAudio (GameObject soundPrefab, Transform parent, float destroyTime=1.0f) |
| | Play instantaneous audio through an instantiated prefab. Gets destroyed after destroyTime.
|
| |
| static void | SetZIndex (SpriteRenderer renderer, Vector3 position, int orderOffset=0) |
| | Sets sprite Z-index order based on position. Enables masking behind objects which are lower on the screen.
|
| |
| static PlayerController | GetPlayerController () |
| | Find and return the PlayerController component present in the scene.
|
| |
◆ GetPlayerController()
◆ PlayAudio()
| static GameObject RPGlite.Utils.PlayAudio |
( |
GameObject | soundPrefab, |
|
|
Transform | parent, |
|
|
float | destroyTime = 1::0f ) |
|
inlinestatic |
Play instantaneous audio through an instantiated prefab. Gets destroyed after destroyTime.
- Parameters
-
| soundPrefab | |
| parent | |
| destroyTime | |
- Returns
◆ SetZIndex()
| static void RPGlite.Utils.SetZIndex |
( |
SpriteRenderer | renderer, |
|
|
Vector3 | position, |
|
|
int | orderOffset = 0 ) |
|
inlinestatic |
Sets sprite Z-index order based on position. Enables masking behind objects which are lower on the screen.
- Parameters
-
| renderer | Renderer to be Z-indexed. |
| position | Renderer global position. |
| orderOffset | Should it be layered above or under other things at same position? Higher numbers mean it will be drawn last. |
◆ zIndexMultiplier
| float RPGlite.Utils.zIndexMultiplier = 25.0f |
|
static |
The documentation for this class was generated from the following file:
- C:/Users/vini/repos/tinyrpg/Assets/RPGliteStarterKit/Scripts/Utils.cs