private void OnTriggerEnter2D(Collider2D collision) { if (ToFloor != FloorManager.GetFloorIndex() || FloorManager.IsLevelStarted()) { BlackScreen.FadeInOut(MyAnim.FrameTime * MyAnim.Sprites.Length); PlayerBase.LockControls(true); MyAnim.Play(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (FloorManager.IsLevelStarted() && FloorManager.IsFloorCleared() || !FloorManager.IsLevelStarted()) { BlackScreen.FadeInOut(0.2f, () => { FloorManager.SetFloor(ToFloor); }); } }