コード例 #1
0
    public override void SelectByInput()
    {
        if (!ManagerPause.Pause)
        {
            touching = true;
            if (!isWaitPress && canTouch)
            {
                canTouch = false;
                if (isPressing)
                {
                    callbackClose();
                }
                else
                {
                    callbackOpen();
                }
                Mira.SetTrigger("Start");
                MiraSpriteRenderer.enabled = true;
#if UNITY_PS4 && !(UNITY_EDITOR)
                audio1.PlayOnDualShock4(PS4Input.PadGetUsersDetails(0).userId);
#endif
                audio1.Play();
                isWaitPress = true;
                StartCoroutine(Pressing(timeToUnlock));
                isPressing = !isPressing;
            }
        }
    }
コード例 #2
0
 void AudioShake()
 {
     if (audio != null && audio.enabled)
     {
                     #if UNITY_PS4 && !(UNITY_EDITOR)
         audio.PlayOnDualShock4(PS4Input.PadGetUsersDetails(0).userId);
                     #else
         audio.Play();
                     #endif
     }
 }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(transform.gameObject);
        AudioSource audio = GetComponent <AudioSource>();

        if (!audio.isPlaying)
        {
#if UNITY_PS4 && !(UNITY_EDITOR)
            audio.PlayOnDualShock4(PS4Input.PadGetUsersDetails(0).userId);
#else
            audio.Play();
#endif
        }
        Destroy(gameObject, audio.clip.length);
    }
コード例 #4
0
    void suena()
    {
        AudioSource audio = GetComponent <AudioSource>();

        if (audio != null && audio.enabled)
        {
#if UNITY_PS4 && !(UNITY_EDITOR)
            if (reproduceInControl)
            {
                audio.PlayOnDualShock4(PS4Input.PadGetUsersDetails(0).userId);
                audio.Play();
            }
            else
            {
                audio.Play();
            }
#else
            audio.Play();
#endif
        }
    }
コード例 #5
0
    public void ResetColor()
    {
#if UNITY_PS4 && !(UNITY_EDITOR)
        PS4Input.PadResetLightBar(PS4Input.PadGetUsersDetails(0).userId);
#endif
    }