mirror of
https://github.com/Xevion/Boids.git
synced 2025-12-09 16:06:33 -06:00
adjusted tweening times, added a delay for about screen close title group, customized tweening ease types
This commit is contained in:
@@ -21,13 +21,6 @@ public class UIController : MonoBehaviour {
|
|||||||
private GameObject[] _aboutElements;
|
private GameObject[] _aboutElements;
|
||||||
private GameObject[] _adjustmentElements;
|
private GameObject[] _adjustmentElements;
|
||||||
|
|
||||||
// Element Group
|
|
||||||
private bool _titleActive = true;
|
|
||||||
private bool _aboutActive = false;
|
|
||||||
private bool _settingsActive = false;
|
|
||||||
private bool _playActive = false;
|
|
||||||
private bool _adjustmentsActive = false;
|
|
||||||
|
|
||||||
private UIStance _currentUI;
|
private UIStance _currentUI;
|
||||||
|
|
||||||
private enum UIStance {
|
private enum UIStance {
|
||||||
@@ -78,20 +71,21 @@ public class UIController : MonoBehaviour {
|
|||||||
private void MoveTitleElements(bool away) {
|
private void MoveTitleElements(bool away) {
|
||||||
foreach (GameObject element in _titleElements) {
|
foreach (GameObject element in _titleElements) {
|
||||||
LeanTween
|
LeanTween
|
||||||
.move(element, element.transform.position + new Vector3(0, 500 * (away ? 1 : -1), 0), 1f)
|
.move(element, element.transform.position + new Vector3(0, 350 * (away ? 1 : -1), 0), away ? 0.75f : 1.15f)
|
||||||
.setEase(LeanTweenType.easeInCubic);
|
.setDelay(away ? 0f : 0.35f)
|
||||||
|
.setEase(away ? LeanTweenType.easeInCubic : LeanTweenType.easeOutCubic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bottom Right About Button
|
||||||
LeanTween
|
LeanTween
|
||||||
.move(aboutButton.gameObject, aboutButton.transform.position + new Vector3(100 * (away ? 1 : -1), 0, 0),
|
.move(aboutButton.gameObject, aboutButton.transform.position + new Vector3(100 * (away ? 1 : -1), 0, 0), 0.75f)
|
||||||
0.75f)
|
|
||||||
.setEase(LeanTweenType.easeInCubic);
|
.setEase(LeanTweenType.easeInCubic);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move About Elements In/Out
|
// Move About Elements In/Out
|
||||||
private void MoveAboutElements(bool away) {
|
private void MoveAboutElements(bool away) {
|
||||||
LeanTween
|
LeanTween
|
||||||
.move(aboutPanel.gameObject, aboutPanel.transform.position + new Vector3(760 * (away ? 1 : -1), 0, 0), 1.2f)
|
.move(aboutPanel.gameObject, aboutPanel.transform.position + new Vector3(750 * (away ? 1 : -1), 0, 0), away ? 0.6f : 0.8f)
|
||||||
.setEase(LeanTweenType.easeInCubic);
|
.setEase(LeanTweenType.easeInCubic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user