Пример #1
0
    public void GameClear()
    {
        if (isPlaying == false)
        {
            return;
        }

        characterControl = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterControl>();
        cameraControl    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraControl>();

        characterControl.Win();
        cameraControl.CameraGameClear();

        isPlaying = false;

        LeaderBoard.instance.addPlayer(currentPlayer);
        LeaderBoardUI.instance.printGameOver(false);

        SoundManager.instance.StopBackgroundMusic();
        SoundManager.instance.PlayGameClearSound();
    }