MCPcopy Create free account
hub / github.com/SolarLune/masterplan / TogglePlayback

Method TogglePlayback

contents.go:1160–1174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1158}
1159
1160func (sc *SoundContents) TogglePlayback() {
1161
1162 if sc.Resource == nil || sc.Sound == nil {
1163 return
1164 }
1165
1166 if sc.Sound.IsPaused() {
1167 sc.Sound.Play()
1168 sc.Playing = true
1169 } else {
1170 sc.Sound.Pause()
1171 sc.Playing = false
1172 }
1173
1174}
1175
1176func (sc *SoundContents) StopPlayback() {
1177

Callers 2

NewSoundContentsFunction · 0.95
UpdateMethod · 0.95

Calls 3

IsPausedMethod · 0.80
PlayMethod · 0.80
PauseMethod · 0.80

Tested by

no test coverage detected