コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (startGameAnimationActive)
        {
            if (bc.Animate())
            {
                SceneManager.LoadScene("GameScene");
            }
        }

        if (!menuIsOpen)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.S))
        {
            UpdateCurrentMenuButton(currentMenuButton + 1);
        }
        else if (Input.GetKeyDown(KeyCode.W))
        {
            UpdateCurrentMenuButton(currentMenuButton - 1);
        }

        if (Input.GetKeyDown(KeyCode.Return))
        {
            ClickButton(currentMenuButton);
        }
    }