/// <summary>
    /// Show the results window, and then return to menu
    /// </summary>
    private IEnumerator Complete_()
    {
        ResultsScreen.Setup();
        ResultsScreen.SetPlayers(_players);

        ScoreStoreHandler.StoreResults(Scene.PunchlineBling, _players);
        var ordered = _players.Where(p => p.GetPoints() > 0).OrderByDescending(p => p.GetPoints()).ToList();

        ordered.FirstOrDefault()?.Winner();

        yield return(new WaitForSeconds(4 + _players.Length));

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
Пример #2
0
    /// <summary>
    /// Adds bonus points and out of the game
    /// </summary>
    /// <returns></returns>
    IEnumerator Complete_()
    {
        _ended = true;
        AssignBonusPoints_();
        ResultsScreen.Setup();

        GenericInputHandler[] genericPlayers = _players.ToArray <GenericInputHandler>();
        ResultsScreen.SetPlayers(genericPlayers);

        ScoreStoreHandler.StoreResults(Scene.ShopDrop, genericPlayers);
        yield return(new WaitForSeconds(4 + _players.Count));

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
Пример #3
0
    /// <summary>
    /// Completes the game and return to object
    /// </summary>
    IEnumerator Complete_()
    {
        yield return(new WaitForSeconds(3f));

        ResultsScreen.Setup();

        GenericInputHandler[] genericPlayers = _players.ToArray <GenericInputHandler>();
        ResultsScreen.SetPlayers(genericPlayers);

        ScoreStoreHandler.StoreResults(Scene.MarshLand, genericPlayers);

        yield return(new WaitForSeconds(4 + genericPlayers.Length));

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
Пример #4
0
    /// <summary>
    /// Show the results window, and then return to menu
    /// </summary>
    private IEnumerator Complete_()
    {
        List <GenericInputHandler> genericPlayers = _players.ToList <GenericInputHandler>();

        ResultsScreen.Setup();
        ResultsScreen.SetPlayers(genericPlayers.ToArray());

        ScoreStoreHandler.StoreResults(Scene.CashDash, _players.ToArray());
        var ordered = _players.Where(p => p.GetPoints() > 0).OrderByDescending(p => p.GetPoints()).ToList();

        ordered.FirstOrDefault()?.Winner();

        yield return(new WaitForSeconds(4 + _players.Count));

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
Пример #5
0
    /// <summary>
    /// Control the end scene
    /// </summary>
    IEnumerator EndScene_()
    {
        _ended = true;

        // wait while podium shows
        yield return(new WaitForSeconds(3.5f));

        ResultsScreen.Setup();
        GenericInputHandler[] genericPlayers = _players.ToArray <GenericInputHandler>();
        ResultsScreen.SetPlayers(genericPlayers);

        yield return(new WaitForSeconds(4 + genericPlayers.Length));

        ScoreStoreHandler.StoreResults(Scene.BeachBowles, genericPlayers);

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
    /// <summary>
    /// Completes the game and return to object
    /// </summary>
    IEnumerator Complete_()
    {
        // assign points for winner
        AssignBonusPoints_();
        yield return(new WaitForSeconds(3f));

        // show results
        ResultsScreen.Setup();
        GenericInputHandler[] genericPlayers = _players.ToArray <GenericInputHandler>();
        ResultsScreen.SetPlayers(genericPlayers);

        // store scores
        ScoreStoreHandler.StoreResults(Scene.CartAttack, genericPlayers);

        // wait for a while to show results
        yield return(new WaitForSeconds(4 + genericPlayers.Length));

        // fade out
        EndFader.StartFade(0, 1, ReturnToCentral_);
    }
Пример #7
0
    /// <summary>
    /// Completes the game
    /// </summary>
    private IEnumerator Complete_()
    {
        AssignBonusPoints_();

        yield return(new WaitForSeconds(1));

        if (!_completed)
        {
            _completed = true;

            ResultsScreen.Setup();
            GenericInputHandler[] genericPlayers = _players.ToArray <GenericInputHandler>();
            ResultsScreen.SetPlayers(genericPlayers);

            ScoreStoreHandler.StoreResults(Scene.XTinguish, genericPlayers);
            yield return(new WaitForSeconds(4 + genericPlayers.Length));

            // fade out
            Fader.StartFade(0, 1, ReturnToCentral_);
        }
    }