MCPcopy Create free account
hub / github.com/Var3D/var3dframe / playMusic

Method playMusic

core/src/core/java/var3d/net/center/VGame.java:1585–1601  ·  view source on GitHub ↗

播放音乐

(String soundName)

Source from the content-addressed store, hash-verified

1583 * 播放音乐
1584 */
1585 public void playMusic(String soundName) {
1586 if (music != null)
1587 music.stop();
1588 if (isMusic == false)
1589 return;
1590 if (assets.isLoaded(soundName, Music.class) == true) {
1591 music = assets.get(soundName, Music.class);
1592 music.setLooping(true);
1593 music.play();
1594 } else {
1595 assets.load(soundName, Music.class);
1596 assets.finishLoading();
1597 music = assets.get(soundName, Music.class);
1598 music.setLooping(true);
1599 music.play();
1600 }
1601 }
1602
1603 /**
1604 * 停止音乐

Callers

nothing calls this directly

Calls 4

stopMethod · 0.80
playMethod · 0.80
loadMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected