public static void CheckEnd() { if (!Characters.Sein || Characters.Sein.Position.x < -2000f) { return; } switch (PracticeManager.EndType) { case 1: if (Characters.Sein.Position.x < PracticeManager.EndPosition.x && Characters.Sein.Position.y < PracticeManager.EndPosition.y) { PracticeManager.End(); } break; case 2: if (Characters.Sein.Position.y < PracticeManager.EndPosition.y) { PracticeManager.End(); } break; case 3: if (Characters.Sein.Position.x > PracticeManager.EndPosition.x && Characters.Sein.Position.y < PracticeManager.EndPosition.y) { PracticeManager.End(); } break; case 4: if (Characters.Sein.Position.x < PracticeManager.EndPosition.x) { PracticeManager.End(); } break; case 6: if (Characters.Sein.Position.x > PracticeManager.EndPosition.x) { PracticeManager.End(); } break; case 7: if (Characters.Sein.Position.x < PracticeManager.EndPosition.x && Characters.Sein.Position.y > PracticeManager.EndPosition.y) { PracticeManager.End(); } break; case 8: if (Characters.Sein.Position.y > PracticeManager.EndPosition.y) { PracticeManager.End(); } break; case 9: if (Characters.Sein.Position.x > PracticeManager.EndPosition.x && Characters.Sein.Position.y > PracticeManager.EndPosition.y) { PracticeManager.End(); } break; default: PracticeManager.End(); break; } }