|
@@ -21,6 +21,9 @@ namespace KairoEngine.UI
|
|
|
|
|
|
[BoxGroup("Settings"), ShowIf("@animateOnDisable")] public bool disableObjectOnEnd = true;
|
|
|
|
|
|
+ [Tooltip("The UiAnimators on this list will be triggered when this animator is enabled or disabled")]
|
|
|
+ [BoxGroup("Settings")] public List<UiAnimator> childUiAnimators = new List<UiAnimator>();
|
|
|
+
|
|
|
[FoldoutGroup("Scale")] public bool animateScale = true;
|
|
|
[FoldoutGroup("Scale"), ShowIf(@"animateScale")] public float scaleDuration = 0.3f;
|
|
|
[FoldoutGroup("Scale"), ShowIf(@"animateScale")] public Vector3 sacelFrom;
|
|
@@ -31,6 +34,8 @@ namespace KairoEngine.UI
|
|
|
[FoldoutGroup("Alpha"), ShowIf(@"animateAlpha")] public float alphaFrom = 0f;
|
|
|
[FoldoutGroup("Alpha"), ShowIf(@"animateAlpha")] public float alphaTo = 1f;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private LTDescr _tweenObject = new LTDescr();
|
|
|
|
|
|
private bool showing = true;
|
|
@@ -51,6 +56,7 @@ namespace KairoEngine.UI
|
|
|
cancelDisable = true;
|
|
|
Animate();
|
|
|
}
|
|
|
+ for (int i = 0; i < childUiAnimators.Count; i++) childUiAnimators[i].Enable();
|
|
|
}
|
|
|
|
|
|
public void Disable()
|
|
@@ -73,6 +79,7 @@ namespace KairoEngine.UI
|
|
|
else if(this != null) gameObject.SetActive(false);
|
|
|
}
|
|
|
});
|
|
|
+ for (int i = 0; i < childUiAnimators.Count; i++) childUiAnimators[i].Disable();
|
|
|
// _tweenObject.setDelay(disableDelay).setOnComplete(() => {
|
|
|
// SwapDirection();
|
|
|
// if(disableObjectOnEnd && !cancelDisable)
|