23 lines
503 B
C#
23 lines
503 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BigSpace.Logic;
|
|
using BigSpace.XRCore.Event;
|
|
using UnityEngine;
|
|
|
|
public class ShowSoundCtr : MonoBehaviour
|
|
{
|
|
public AudioSource audioSource;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
GlobalEventMgr.Listen(GameEvent.EventShowSound, GameDataManage_EventShowSound);
|
|
}
|
|
|
|
void GameDataManage_EventShowSound()
|
|
{
|
|
if (audioSource != null)
|
|
audioSource.Play();
|
|
}
|
|
}
|