Highroad Engine v1.3
Public Types | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMTwoSidedUI Class Reference

This class lets you define an axis on which to flip a "two sided" UI element (made of two separate and usually aligned objects, effectively turning each side on/off everytime the container's scale goes above/below a certain threshold More...

Inheritance diagram for MoreMountains.Tools.MMTwoSidedUI:

Public Types

enum  Axis { x , y , z }
 the possible axis on which to flip the double object More...
 

Public Attributes

GameObject Front
 the object to consider as the "front" of the two sided element. Will be visible if the scale is above the threshold More...
 
GameObject Back
 the object to consider as the "back" of the two sided element. Will be visible if the scale is below the threshold More...
 
Axis FlipAxis
 the axis on which to flip this object More...
 
float ScaleThreshold = 0f
 the scale threshold at which the flip should occur More...
 
UnityEvent OnFlip
 an event to invoke on flip More...
 
bool DebugMode
 whether or not we're in debug mode More...
 
float ScaleValue
 the value to apply to the scale when in debug mode More...
 
bool BackVisible = false
 whether or not our object is flipped right now More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our object More...
 
virtual void Initialization ()
 On init we grab our rect transform and initialize visibility More...
 
virtual void Update ()
 On Update we update visibility if needed More...
 
virtual void IfEditor ()
 If in editor, we initialize if needed, and apply the debug scale value if needed More...
 
virtual float GetScaleValue ()
 Returns the scale of the selected axis More...
 

Protected Attributes

RectTransform _rectTransform
 
bool _initialized = false
 

Detailed Description

This class lets you define an axis on which to flip a "two sided" UI element (made of two separate and usually aligned objects, effectively turning each side on/off everytime the container's scale goes above/below a certain threshold

Member Enumeration Documentation

◆ Axis

the possible axis on which to flip the double object

Enumerator

Member Function Documentation

◆ GetScaleValue()

virtual float MoreMountains.Tools.MMTwoSidedUI.GetScaleValue ( )
protectedvirtual

Returns the scale of the selected axis

Returns

◆ IfEditor()

virtual void MoreMountains.Tools.MMTwoSidedUI.IfEditor ( )
protectedvirtual

If in editor, we initialize if needed, and apply the debug scale value if needed

◆ Initialization()

virtual void MoreMountains.Tools.MMTwoSidedUI.Initialization ( )
protectedvirtual

On init we grab our rect transform and initialize visibility

◆ Start()

virtual void MoreMountains.Tools.MMTwoSidedUI.Start ( )
protectedvirtual

On Start we initialize our object

◆ Update()

virtual void MoreMountains.Tools.MMTwoSidedUI.Update ( )
protectedvirtual

On Update we update visibility if needed

Member Data Documentation

◆ _initialized

bool MoreMountains.Tools.MMTwoSidedUI._initialized = false
protected

◆ _rectTransform

RectTransform MoreMountains.Tools.MMTwoSidedUI._rectTransform
protected

◆ Back

GameObject MoreMountains.Tools.MMTwoSidedUI.Back

the object to consider as the "back" of the two sided element. Will be visible if the scale is below the threshold

◆ BackVisible

bool MoreMountains.Tools.MMTwoSidedUI.BackVisible = false

whether or not our object is flipped right now

◆ DebugMode

bool MoreMountains.Tools.MMTwoSidedUI.DebugMode

whether or not we're in debug mode

◆ FlipAxis

Axis MoreMountains.Tools.MMTwoSidedUI.FlipAxis

the axis on which to flip this object

◆ Front

GameObject MoreMountains.Tools.MMTwoSidedUI.Front

the object to consider as the "front" of the two sided element. Will be visible if the scale is above the threshold

◆ OnFlip

UnityEvent MoreMountains.Tools.MMTwoSidedUI.OnFlip

an event to invoke on flip

◆ ScaleThreshold

float MoreMountains.Tools.MMTwoSidedUI.ScaleThreshold = 0f

the scale threshold at which the flip should occur

◆ ScaleValue

float MoreMountains.Tools.MMTwoSidedUI.ScaleValue

the value to apply to the scale when in debug mode


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