Example #1
0
    private void Start()
    {
        availablePortals = GameObject.FindGameObjectWithTag("availablePortals").GetComponent <AvailablePortals>();
        availablePortals.isInPlaylistMode = false;
        portals = availablePortals.GetPortals();

        PopulateButtons();
    }
Example #2
0
    private void Start()
    {
        pop = gameObject.GetComponent <AudioSource>();
        availablePortals = GameObject.FindGameObjectWithTag("availablePortals").GetComponent <AvailablePortals>();
        portals          = availablePortals.GetPortals();

        PopulateButtons();
    }
Example #3
0
    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);
        }
    }