private void Start() { availablePortals = GameObject.FindGameObjectWithTag("availablePortals").GetComponent <AvailablePortals>(); availablePortals.isInPlaylistMode = false; portals = availablePortals.GetPortals(); PopulateButtons(); }
private void Start() { pop = gameObject.GetComponent <AudioSource>(); availablePortals = GameObject.FindGameObjectWithTag("availablePortals").GetComponent <AvailablePortals>(); portals = availablePortals.GetPortals(); PopulateButtons(); }
bool NextPortalAwarded() { LevelObject currentPortal = availablePortals.ActivePortal; // This means that the player has beaten the game if (currentPortal.reward == null) { // CHANGE THIS LATER....PLAYER HAS BEATEN THE GAME! return(false); } if (rawScore >= currentPortal.requiredScore && speedBonus >= currentPortal.requiredSpeedBonus && !availablePortals.GetPortals().Contains(currentPortal.reward)) { return(true); } else { return(false); } }