BBGamelib.SimpleAudioEngine.playEffect C# (CSharp) Method

playEffect() public method

public playEffect ( string filePath ) : int
filePath string
return int
		public int playEffect(string filePath){
			if (filePath == null) {
				CCDebug.Warning ("cocos2d:SimpleAudioEngine: Audio file path should not be null.");					
				return - 1;
			}
			AudioClip audio = getAudioClip (filePath);
			if(audio==null){
				CCDebug.Warning ("cocos2d:SimpleAudioEngine: Audio {0} not found.", filePath);
				return -1;
			}else{
				_currentSource = (_currentSource+1)%AUDIO_SOURCES_NUM;
				playAudio (audio, _audioSources[_currentSource], false, _effectsVolume);
				return _currentSource;
			}
		}