Remove use of animator in UI.
This commit is contained in:
@@ -13,8 +13,6 @@ namespace Cryville.Crtr.UI {
|
||||
[SerializeField]
|
||||
ResourceBrowserMaster m_browserMaster;
|
||||
[SerializeField]
|
||||
Animator m_targetAnimator;
|
||||
[SerializeField]
|
||||
ProgressBar m_progressBar;
|
||||
[SerializeField]
|
||||
PropertyMasterPanel m_settingsPanel;
|
||||
@@ -47,21 +45,16 @@ namespace Cryville.Crtr.UI {
|
||||
m_progressBar.value = totalTasks == 0 ? 1 : (1 - (float)taskCount / totalTasks);
|
||||
if (taskCount == 0) {
|
||||
initialized = true;
|
||||
m_targetAnimator.SetTrigger("T_Main");
|
||||
// TODO Show main
|
||||
}
|
||||
}
|
||||
if (unity::Input.GetKeyDown(KeyCode.Escape)) {
|
||||
if (m_targetAnimator != null) Back();
|
||||
Back();
|
||||
}
|
||||
}
|
||||
|
||||
private static string animatorState = null;
|
||||
void OnDisable() {
|
||||
animatorState = m_targetAnimator.GetCurrentAnimatorClipInfo(0)[0].clip.name;
|
||||
}
|
||||
void OnEnable() {
|
||||
Application.targetFrameRate = 60;
|
||||
if (animatorState != null) m_targetAnimator.PlayInFixedTime(animatorState, 0, 0);
|
||||
Game.ResumeBackgroundTasks();
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
@@ -76,7 +69,6 @@ namespace Cryville.Crtr.UI {
|
||||
if (obj.activeInHierarchy) return;
|
||||
}
|
||||
if (m_browserMaster.Back()) return;
|
||||
m_targetAnimator.SetTrigger("G_Back");
|
||||
if (_uiStack.Count <= 1) return;
|
||||
_uiStack.Pop();
|
||||
m_title.SetText(_uiStack.Peek());
|
||||
|
Reference in New Issue
Block a user