Manual

UIEffect

class in Doozy.Engine.UI.Base / Inherits from: MonoBehaviour

Description

An UIEffect manages a target ParticleSystem by dynamically changing its sorting layer and sorting order, in relation to any Canvas component, and also plays or stops the effect when invoked

Properties

Public Variables

Constructors

  • public UIEffect() – Initializes a new instance of the class

Public Methods

  • public void Clear() – Removes all existing emitted particles of the target ParticleSystem

  • public void Emit(int count) – Emit count particles immediately by the target ParticleSystem

  • public void Execute() – Executes the UIEffect’s action (Play or Stop) and does not override ParticleSystem SortingLayer or sorting order

  • public void Execute(string sortingLayer, int sortingOrder) – Executes the UIEffect’s action (Play or Stop) and sets the given sortingLayer and sortingOrder to the target ParticleSystem

  • public void OverrideSortingAndPlay(string overrideSortingLayer, int overrideSortingOrder) – Overrides the current sorting layer and sorting order, on the target ParticleSystem, with the passed value and then starts playing the effect

  • public void Play(string sortingLayer, int sortingOrder) – Starts playing the effect after it takes into account if OverrideSorting or AutoSort are enabled and updates the sorting layer name and sorting order of the target ParticleSystem

  • public void Play() – Starts playing the effect with the current settings

  • public void Reset() – Resets this instance to the default values

  • public bool SetSortingLayer(string sortingLayerName) – Updates the SortingLayer of the target ParticleSystem. If the new layerName has not been defined in the SortingLayer list this operation will fail and return false

  • public void SetSortingOrder(int sortingOrder) – Updates the order in layer of the target ParticleSystem

  • public void Stop() – Stops the target ParticleSystem from emitting any further particles using the set StopBehavior (ParticleSystemStopBehavior)

  • public void Stop(ParticleSystemStopBehavior stopBehavior) – Stops the target ParticleSystem from emitting any further particles using the given stopBehavior

  • public void UpdateSorting(string sortingLayer, int sortingOrder) – Updates the target ParticleSystem sorting taking into account the UIEffect’s current settings