void CheckMouseHover() { if (song.isPlaying && song.hasStarted && !isMouseOverGame()) //fullWindow.Contains(Event.current.mousePosition) { song.Pause(); Time.timeScale = 0.0f; } if (!song.isPlaying && song.hasStarted && isMouseOverGame()) //!fullWindow.Contains(Event.current.mousePosition) { song.Play(); Time.timeScale = gameSpeed; } }
public void Pause() { songController.Pause(); }