改动与优化
This commit is contained in:
@@ -204,6 +204,7 @@ public class notebookController : MonoBehaviour
|
||||
comp.SetFatherImage(so.class_image);
|
||||
if (comp.father_description != null) comp.father_description.text = so.class_description;
|
||||
SetupFatherItem(comp, so, fatherGroup);
|
||||
UI_OrderedEntryAnimator.PlaySingle(obj, i, 0.18f, 0.012f, -14f, 0.97f, true);
|
||||
if (firstFatherToggle == null)
|
||||
{
|
||||
firstFatherToggle = ResolveFatherToggle(comp);
|
||||
@@ -302,6 +303,7 @@ public class notebookController : MonoBehaviour
|
||||
if (son == null) continue;
|
||||
if (!son.son_isUnlocked) continue;
|
||||
var obj = Instantiate(prefab, parent);
|
||||
UI_OrderedEntryAnimator.PlaySingle(obj, i, 0.16f, 0.018f, -10f, 0.97f, true);
|
||||
var sonComp = obj.GetComponent<sonItemPrefab>();
|
||||
Toggle sonToggle = null;
|
||||
if (sonComp != null && sonComp.sonToggle != null) sonToggle = sonComp.sonToggle;
|
||||
@@ -396,6 +398,7 @@ public class notebookController : MonoBehaviour
|
||||
}
|
||||
if (passage_title != null) passage_title.text = son.son_title;
|
||||
if (passage_text != null) passage_text.text = son.son_passage;
|
||||
PlayDetailsRefresh();
|
||||
}
|
||||
|
||||
private void InvokeToggleAction(Toggle toggle, System.Action onSelected)
|
||||
@@ -823,4 +826,13 @@ public class notebookController : MonoBehaviour
|
||||
|
||||
ApplySonDetails(father, son);
|
||||
}
|
||||
|
||||
private void PlayDetailsRefresh()
|
||||
{
|
||||
GameObject target = null;
|
||||
if (detailsImage != null) target = detailsImage.gameObject;
|
||||
if (target == null && passage_title != null) target = passage_title.gameObject;
|
||||
if (target == null && passage_text != null) target = passage_text.gameObject;
|
||||
UI_OrderedEntryAnimator.PlayRefresh(target, 0.16f, -8f, 0.99f, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user