// [[ ----- ON TRIGGER ENTER 2D ----- ]] private void OnTriggerEnter2D(Collider2D _other) { if (_other.tag == "Player" && SceneMaster.active.DoorsUnlocked < 2) { popupText.PlayAnim(); } }
// [[ ----- PURCHASE CHECKPOINT ----- ]] private void PurchaseCheckpoint() { // check if pc has enough ffs if (SceneMaster.active.FOwnedCount >= 3) { // PURCHASE CHECKPOINT AudioMaster.active.SoundEffect(AudioMaster.FXType.Checkpoint, 0); // deduct the ffs SceneMaster.active.UpdateFFCount(-3); // Make active checkpoint Checkpoint.OnCheckpointHit(gameObject.name); // reset ff pickups foreach (FireflyPickup ff in FireflyPickup.MasterList) { ff.SetActive(true); } // Unlock door SceneMaster.active.UnlockDoor(); } else { // display how many ffs required int ffreq = 3 - SceneMaster.active.FOwnedCount; popupText.SetText(noticeString1 + ffreq + noticeString2); popupText.PlayAnim(); } }