public override string showDebugInfo() { string soundName; if (mSound != SOUND_DEFINE.SD_MIN) { soundName = ComponentAudio.getAudioName(mSound); } else { soundName = mSoundFileName; } return(this.GetType().ToString() + " : sound : " + mSound + ", name : " + soundName + ", loop : " + mLoop + ", volume : " + mVolume); }
public override void execute() { txUIObject window = mReceiver as txUIObject; WindowComponentAudio audioComponent = window.getFirstActiveComponent <WindowComponentAudio>(); if (audioComponent != null) { string soundName; if (mSound != SOUND_DEFINE.SD_MIN) { soundName = ComponentAudio.getAudioName(mSound); } else { soundName = mSoundFileName; } audioComponent.play(soundName, mLoop, mVolume); } }
public override void execute() { GameScene gameScene = (mReceiver) as GameScene; GameSceneComponentAudio audioComponent = gameScene.getFirstActiveComponent <GameSceneComponentAudio>(); if (audioComponent != null) { string soundName; if (mSound != SOUND_DEFINE.SD_MIN) { soundName = ComponentAudio.getAudioName(mSound); } else { soundName = mSoundFileName; } audioComponent.play(soundName, mLoop, mVolume); } }