public void ShelfClosed(QuickShelf shelf) { if (shelf) { destroyCount--; if (destroyCount <= 0) { Closed(); } } }
private void OutTransition() { destroyCount = 0; for (int i = 0; i < transform.childCount; i++) { Transform trans = transform.GetChild(i); if (trans) { QuickShelf comp = trans.GetOrAddComponent <QuickShelf>(); comp.Out(this); destroyCount++; } } EventMessage em = new EventMessage(outSound, _paramBool: true); EventManager.Broadcast(em); if (destroyCount <= 0) { Closed(); } }
private void InTransition() { active = true; if (blocker) { blocker.Lock(); } for (int i = 0; i < transform.childCount; i++) { Transform trans = transform.GetChild(i); if (trans) { QuickShelf comp = trans.GetOrAddComponent <QuickShelf>(); comp.Init(); comp.In(); } } EventMessage em = new EventMessage(inSound, _paramBool: true); EventManager.Broadcast(em); }