private void DisplayPanel(GameObject panel) { print("Display panel: " + panel.name); animations.Add( Scale2D.On(panel) .From(Vector3.zero) .To(Vector3.one) .For(0.5f) .Over(Curve.CubicEaseOut) .Start() ); }
private void HidePanel(List <string> excluding) { foreach (KeyValuePair <string, GameObject> entry in panels) { if (!excluding.Contains(entry.Key) && entry.Value.activeSelf) { print("Hide panel: " + entry.Value.name); animations.Add( Scale2D.On(entry.Value) .From(Vector3.one) .To(Vector3.zero) .For(0.5f) .Over(Curve.CubicEaseOut) .AndThen(() => { //entry.Value.transform.localScale = Vector3.zero; entry.Value.SetActive(false); }) .Start() ); } } }