Example #1
0
    // Stop the game if ball is in hole
    public void End(uint strokes)
    {
        // Play ending sound once
        audioSource.loop   = false;
        audioSource.volume = 1.0f;
        audioSource.clip   = completed;
        audioSource.Play();

        // Display ending message
        uidisplay.DisplayEnd(strokes);
        Debug.Log("End of game, strokes " + strokes);
    }