コード例 #1
0
    void Start()
    {
        soundsManager = FindObjectOfType <SoundsManager>();
        retryButton.GetComponent <Button_UI>().ClickFunc = () =>
        {
            StartCoroutine(LoadGameScene());
        };
        retryButton.MouseOverOnceFunc += () => { soundsManager.PlaySound(0); };
        retryButton.ClickFunc         += () => { soundsManager.PlaySound(1); };

        menuButton.GetComponent <Button_UI>().ClickFunc = () =>
        {
            StartCoroutine(LoadMenuScene());
        };
        menuButton.MouseOverOnceFunc += () => { soundsManager.PlaySound(0); };
        menuButton.ClickFunc         += () => { soundsManager.PlaySound(3); };
    }
コード例 #2
0
    void Start()
    {
        soundsManager = FindObjectOfType <SoundsManager>();
        playButton.GetComponent <Button_UI>().ClickFunc = () =>
        {
            StartCoroutine(LoadGameScene());
        };
        playButton.MouseOverOnceFunc += () => { soundsManager.PlaySound(0); };
        playButton.ClickFunc         += () => { soundsManager.PlaySound(1); };

        quitButton.GetComponent <Button_UI>().ClickFunc = () =>
        {
            Application.Quit();
        };
        quitButton.MouseOverOnceFunc += () => { soundsManager.PlaySound(0); };
        quitButton.ClickFunc         += () => { soundsManager.PlaySound(3); };
    }