public void CheckSort() { // Check the current state of the sort // End the game if everything is sorted bool allSorted = true; foreach (TouhouSortSortable sortable in touhous) { bool thisSorted = false; // Get the touhou's current zone, if any TouhouSortDropZone currentZone = sortable.GetCurrentZone(); if (currentZone) { thisSorted = currentZone.Belongs(sortable); } if (thisSorted != true) { allSorted = false; break; } } if (allSorted) { confettiParticles.gameObject.SetActive(true); confettiParticles.Play(); MicrogameController.instance.playSFX(victoryClip, 0f, 1f, .75f); MicrogameController.instance.setVictory(true, true); } }
public void ExitZone(TouhouSortDropZone zone) { if (currentZone == zone) { currentZone = null; } }
public void CheckSort() { // Check the current state of the sort // End the game if everything is sorted bool allSorted = true; foreach (TouhouSortSortable sortable in touhous) { bool thisSorted = false; // Get the touhou's current zone, if any TouhouSortDropZone currentZone = sortable.GetCurrentZone(); if (currentZone) { thisSorted = currentZone.Belongs(sortable); } if (thisSorted != true) { allSorted = false; break; } } if (allSorted) { // Sorted //Debug.Log("Sorted"); sorted = true; victoryDisplay.SetActive(true); MicrogameController.instance.setVictory(true, true); } else if (sorted) { // Unsorted (wont ever happen) Debug.Log("Unsorted"); sorted = false; victoryDisplay.SetActive(false); MicrogameController.instance.setVictory(false, true); } }
public void SetZoneAttributes(int index, Sprite sprite, string style, bool invert) { TouhouSortDropZone zone = zones[index]; zone.SetCategory(style, invert, sprite); }
public void EnterZone(TouhouSortDropZone zone) { currentZone = zone; }