コード例 #1
0
    public void ScoreGoal()
    {
        score++;

        if (score == PlayerPrefsController.GetGoalLimit())
        {
            FindObjectOfType <WinManager>().TriggerWinScenario(this);
            ball.Stop();
        }
        else
        {
            ball.Restart();
        }
    }
コード例 #2
0
    // Start is called before the first frame update
    private void Start()
    {
        if (PlayerPrefsController.GetNumberOfPlayer() == 1)
        {
            singlePlayerToggle.isOn = true;
        }
        else
        {
            twoPlayerToggle.isOn = true;
        }

        goalLimitSlider.value   = PlayerPrefsController.GetGoalLimit();
        soundVolumeSlider.value = PlayerPrefsController.GetSoundVolume();
    }