Class ParticleUIExtensionSmoothLerp
Controls the particle panel extension lerping movement.
Inheritance
ParticleUIExtensionSmoothLerp
Namespace: AS2.UI
Assembly: .dll
Syntax
public class ParticleUIExtensionSmoothLerp : MonoBehaviour
Fields
button_expansionContraction
Declaration
public Button button_expansionContraction
Field Value
movement_enableLerp
Declaration
private bool movement_enableLerp
Field Value
movement_expansionPercentage
Declaration
private float movement_expansionPercentage
Field Value
movement_isExpanding
Declaration
private bool movement_isExpanding
Field Value
movement_layoutGroup
Declaration
public VerticalLayoutGroup movement_layoutGroup
Field Value
Type |
Description |
VerticalLayoutGroup |
|
movement_layoutGroupLeftPaddingContracted
Declaration
public float movement_layoutGroupLeftPaddingContracted
Field Value
movement_layoutGroupLeftPaddingExpanded
Declaration
public float movement_layoutGroupLeftPaddingExpanded
Field Value
movement_panelTransform
Declaration
public RectTransform movement_panelTransform
Field Value
Type |
Description |
RectTransform |
|
movement_panelTransformWidthContracted
Declaration
public float movement_panelTransformWidthContracted
Field Value
movement_panelTransformWidthExpanded
Declaration
public float movement_panelTransformWidthExpanded
Field Value
movement_percentagePerSec
Declaration
private float movement_percentagePerSec
Field Value
movement_useLerp
Declaration
private bool movement_useLerp
Field Value
particlePanel
Declaration
public ParticleUIHandler particlePanel
Field Value
sprite_contracted
Declaration
public Sprite sprite_contracted
Field Value
sprite_expanded
Declaration
public Sprite sprite_expanded
Field Value
Methods
ContractRandomisationExtension(bool)
Starts the contraction of the randomization panel.
Declaration
public void ContractRandomisationExtension(bool useLerp)
Parameters
Type |
Name |
Description |
bool |
useLerp |
Indicates whether the contraction
should be animated.
|
ExpandRandomisationExtension(bool)
Starts the expansion of the randomization panel.
Declaration
public void ExpandRandomisationExtension(bool useLerp)
Parameters
Type |
Name |
Description |
bool |
useLerp |
Indicates whether the expansion
should be animated.
|
GetLerpEnabled()
Checks whether or not the smooth lerping animation is enabled.
Declaration
public bool GetLerpEnabled()
Returns
Type |
Description |
bool |
true if and only if the animation is enabled.
|
OnOpenClose(bool)
Callback that should be triggered when the particle panel
is opened or closed.
If the particle panel is opened in Init Mode, the randomization
panel is automatically opened without animation.
Declaration
private void OnOpenClose(bool opened)
Parameters
Type |
Name |
Description |
bool |
opened |
Indicates whether the particle panel was opened.
|
SetLerpEnabled(bool)
Enables or disables the smooth lerping animation.
Declaration
public void SetLerpEnabled(bool lerpEnabled)
Parameters
Type |
Name |
Description |
bool |
lerpEnabled |
The new enabled status.
|
SetToDefault()
Closes the randomization panel without animation.
Declaration
private void SetToDefault()
Start()
Declaration
ToggleExpansionOrContraction()
Switches the current expansion state or movement to
the respective other one with animation, if animation
is enabled.
Declaration
public void ToggleExpansionOrContraction()
Update()
Declaration
UpdateUI()
Translates the linear movement percentage into a smooth
movement and converts the percentage into real size values
for the vertical layout group and the rect transform.
Also applies the correct image to the control button.
Declaration