FairyGUI.Stage.PlayOneShotSound C# (CSharp) Method

PlayOneShotSound() public method

public PlayOneShotSound ( AudioClip clip ) : void
clip AudioClip
return void
		public void PlayOneShotSound(AudioClip clip)
		{
			if (_audio != null && this.soundVolume > 0)
				_audio.PlayOneShot(clip, this.soundVolume);
		}

Same methods

Stage::PlayOneShotSound ( AudioClip clip, float volumeScale ) : void

Usage Example

示例#1
0
 static public int PlayOneShotSound(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             FairyGUI.Stage        self = (FairyGUI.Stage)checkSelf(l);
             UnityEngine.AudioClip a1;
             checkType(l, 2, out a1);
             self.PlayOneShotSound(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 3)
         {
             FairyGUI.Stage        self = (FairyGUI.Stage)checkSelf(l);
             UnityEngine.AudioClip a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             self.PlayOneShotSound(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.Stage::PlayOneShotSound