static void ready() { if (instance == null) { instance = new PSound(); } }
protected override void PreDestory() { PTweener.clear(); if (isClearSound) { PSound.destroy(); } }
protected override void UpdateOneLoop() { if (isEnableSound) { PSound.update(); } PTweener.update(); base.UpdateOneLoop(); }
protected override void PreSetup() { if (isEnableSound) { PSound.setup(!isClearSound); } //PTweenCompilerHint.unusedCode(); uiResetMouse(); uiStyle.init(this); }
public static void destroy() { if(instance!=null) { if(soundPlayer!=null) { soundPlayer.clearBGM(); soundPlayer.clearSE(); soundPlayer = null; } if(psoundObj!=null) { GameObject.Destroy(psoundObj); psoundObj = null; } instance = null; } }
static public void destroy() { if (instance != null) { if (soundPlayer != null) { soundPlayer.clearBGM(); soundPlayer.clearSE(); soundPlayer = null; } if (psoundObj != null) { GameObject.Destroy(psoundObj); psoundObj = null; } instance = null; } }
public static bool isPlayingBGM() { return(PSound.isPlayingBGM()); }
static void ready() { if(instance==null) instance = new PSound(); }
public static void setBGMVolume(float volume) { PSound.setBGMVolume(volume); }
public static void reserveBGM(string resourceName, string name = null) { PSound.reserveBGM(resourceName, name); }
public static void clearBGM() { PSound.clearBGM(); }
public static void clearSE() { PSound.clearSE(); }
public static void stopBGM() { PSound.stopBGM(0.2f); }
public static void resumeBGM() { PSound.playBGM(); }
public static bool isPauseBGM() { return(PSound.isPauseBGM()); }
public static void pauseBGM() { PSound.pauseBGM(); }
public static void playBGM(string name, float volume = 1.0f, bool isLoop = true) { PSound.playBGM(name, volume, 0.25f); PSound.setLoopBGM(isLoop); }
public static void playSE(string name, float volume = 1.0f) { PSound.playSE(name, volume); }