Exemplo n.º 1
0
    public void RequestPlaying()
    {
        int r = Random.Range(0, audioClips.Length);

        switch (soundType)
        {
        case SoundType.BGM_LOOP:
            requisitor.RequestBGMAndLoop(audioClips[r]);
            break;

        case SoundType.SFX:
            requisitor.RequestSFX(audioClips[r]);
            break;

        case SoundType.SFX_AND_STOP_BGM_AND_SET_BGMCLIP_TO_NULL:
            requisitor.RequestSFX(audioClips[r]);
            requisitor.RequestStopBGMAndSetBGMClipToNull();
            break;

        case SoundType.STOP_SFX:
            requisitor.RequestStopSFX();
            break;

        case SoundType.BGM_ONE_SHOT:
            requisitor.RequestBGMToPlayOneSingleTime(audioClips[r]);
            break;
        }
    }
Exemplo n.º 2
0
    public void UpToDownBtnVisualAndSoundEffects()
    {
        float yMax = originalRectTransfmOffsetMaxDotY - textVerticalDesloc;
        float yMin = originalRectTransformOffsetMinDotY - textVerticalDesloc;

        ConfigureBtnLooks(clickedSprite, yMax, yMin, BtnDownTextColor);
        soundRequisitor.RequestSFX(btnClickSound);
    }