Пример #1
0
    // Update is called once per frame
    void Update()
    {
        bool isEsc   = Input.GetKeyDown(KeyCode.Escape);
        bool isHome  = WiiMote.wiimote_getButtonHome(Configuration.pointerWiiMote);
        bool isMinus = WiiMote.wiimote_getButtonMinus(Configuration.pointerWiiMote);

        if (menuOpen)
        {
            selectOption();
        }

        if (isEsc)
        {
            pauseGame();
        }

        if (isMinus && !pauseCheck || isHome && !pauseCheck)
        {
            pauseCheck = true;
            pauseGame();
        }
    }