private void OnTriggerStay2D(Collider2D collision) { if (collision.tag == "Player") { if (input) { if (!(switchTo == PlanetType.Ice ? playerData.icePlanetUnlocked : playerData.dryPlanetUnlocked) && playerData.collectedTemporalCoagulateInt >= requiredTemporalCoagulate) { playerData.icePlanetUnlocked = true; FindObjectOfType <TilemapSwapper2>().SetPlanetTypeInt(switchTo); playerData.planetSwitcherCounter = (int)switchTo; icons.FadeInPlanetIcon((int)switchTo); icons.FadeOutPlanetIcon(playerData.previousPlanet); promptText.text = done; FindObjectOfType <SFXPlayer>().PlayIceBreakSound(); } else if (playerData.collectedTemporalCoagulateInt < requiredTemporalCoagulate) { promptText.text = "Not Enough Temporal Coagulate to Alter Time. Still need " + (requiredTemporalCoagulate - playerData.collectedTemporalCoagulateInt).ToString(); } } } }