示例#1
0
 void OnDestroy()
 {
     EventBroadcaster.RemoveActionAtObserver(EventNames.PlayOneShot, HandleOnPlayOneShotRequest);
     EventBroadcaster.RemoveActionAtObserver(EventNames.ToggleBGM, HandleOnToggleBGM);
     EventBroadcaster.RemoveActionAtObserver(EventNames.ToggleSFX, HandleOnToggleSFX);
 }
示例#2
0
 void Start()
 {
     EventBroadcaster.AddObserver(EventNames.PlayOneShot, HandleOnPlayOneShotRequest);
     EventBroadcaster.AddObserver(EventNames.ToggleBGM, HandleOnToggleBGM);
     EventBroadcaster.AddObserver(EventNames.ToggleSFX, HandleOnToggleSFX);
 }