void PlayThisAudioStatement(AudioClip clip) { PlayAudio clipPlayer = new PlayAudio(); clipPlayer = GameObject.FindWithTag("Player").GetComponent <PlayAudio>(); clipPlayer.PlayThisAudioClip(clip); }
//update function done void PlayThisAudioStatement(AudioClip clip) { Debug.Log("pauseTime"); PlayAudio statement2player = new PlayAudio(); statement2player = GameObject.FindWithTag("Player").GetComponent <PlayAudio>(); statement2player.PlayThisAudioClip(clip); }