public void CompleteClose() { if (Visible) { Destroy(current.gameObject); current = null; } }
public void Open(TransitionType type) { TransitionScreen screenTemplate = Array.Find(templates, template => template.Type == type); if (screenTemplate != null) { GameObject screen = Instantiate(screenTemplate.gameObject, transform, false); screen.SetActive(true); current = screen.GetComponent <TransitionScreen>(); } }