Ejemplo n.º 1
0
    public void OnNil2HitEvent(int nil2Type)
    {
        if (gameStatus != GAME_STATUS_STARTED)
        {
            return;
        }

        score         += GetNil2Score(nil2Type);
        scoreText.text = score.ToString();
        sound.PlaySE(hitSE, 0.5f);
    }
Ejemplo n.º 2
0
    void MoveMenu(int moveMenuType)
    {
        if (moveMenuType == MOVE_MENU_TYPE_UP)
        {
            menuI--;
            sound.PlaySE(moveSE, 0.3f);
        }
        else if (moveMenuType == MOVE_MENU_TYPE_DOWN)
        {
            menuI++;
            sound.PlaySE(moveSE, 0.3f);
        }
        else if (moveMenuType == MOVE_MENU_TYPE_ESCAPE)
        {
            if (menuI == menus.Length - 1)
            {
                SelectMenu();
                return;
            }
            else
            {
                menuI = menus.Length - 1;
                sound.PlaySE(moveSE, 0.3f);
            }
        }

        if (menuI < 0)
        {
            menuI = menus.Length + (menuI % menus.Length);
        }
        else if (menuI >= menus.Length)
        {
            menuI = menuI % menus.Length;
        }

        UpdateMenu();
    }