public override void execute()
    {
        ComponentOwner       obj       = mReceiver as ComponentOwner;
        WindowComponentAudio component = obj.getComponent(out component);

        component.setActive(true);
        string soundName = mSound != SOUND_DEFINE.SD_MAX ? mAudioManager.getAudioName(mSound) : mSoundFileName;

        if (mUseVolumeCoe)
        {
            mVolume *= mAudioManager.getVolumeScale(mSound);
        }
        component.play(soundName, mLoop, mVolume);
    }
	public override void execute()
	{
		txUIObject window = mReceiver as txUIObject;
		WindowComponentAudio audioComponent = window.getFirstActiveComponent<WindowComponentAudio>();
		if (audioComponent != null)
		{
			string soundName = mSound != SOUND_DEFINE.SD_MAX ? mAudioManager.getAudioName(mSound) : mSoundFileName;
			if (mUseVolumeCoe)
			{
				mVolume *= mAudioManager.getVolumeScale(mSound);
			}
			audioComponent.play(soundName, mLoop, mVolume);
		}
	}
Esempio n. 3
0
    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);
        }
    }