RPGlite Starter Kit  1.0.0
Starting RPG projects made easy.
Loading...
Searching...
No Matches
RPGlite.Utils Class Reference
Inheritance diagram for RPGlite.Utils:
[legend]

Static Public Member Functions

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.
 

Static Public Attributes

static float zIndexMultiplier = 25.0f
 

Member Function Documentation

◆ GetPlayerController()

static PlayerController RPGlite.Utils.GetPlayerController ( )
inlinestatic

Find and return the PlayerController component present in the scene.

Returns
The PlayerController instance present in the scene.

◆ 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
rendererRenderer to be Z-indexed.
positionRenderer global position.
orderOffsetShould it be layered above or under other things at same position? Higher numbers mean it will be drawn last.

Member Data Documentation

◆ zIndexMultiplier

float RPGlite.Utils.zIndexMultiplier = 25.0f
static

The documentation for this class was generated from the following file: