Exemplo n.º 1
0
		// PUBLIC
		/// <summary>
		/// Plaies the sound.
		/// </summary>
		/// <param name="aSoundPlayVO">A sound play V.</param>
		public void playSound (SoundPlayVO aSoundPlayVO)
		{

			//Debug.Log ("playSound: " + aSoundPlayVO.soundType);
			switch (aSoundPlayVO.soundType){
			case SoundType.BUTTON_CLICK:
				_getAudioSourceByIndex(0).clip = _getAudioClipByName ("ButtonClick01");
				_getAudioSourceByIndex(0).Play ();
				break;
			case SoundType.GAME_OVER_WIN:
				_getAudioSourceByIndex(1).clip = _getAudioClipByName ("GameOverWin");
				_getAudioSourceByIndex(1).Play ();
				break;
			default:
				#pragma warning disable 0162
				throw new SwitchStatementException(aSoundPlayVO.soundType);
				break;
				#pragma warning restore 0162
			}
		}
		//	PUBLIC
		
		
		// PRIVATE
		
		// PRIVATE STATIC
		
		// PRIVATE COROUTINE
		
		// PRIVATE INVOKE
		
		//--------------------------------------
		//  Events
		//--------------------------------------
		/// <summary>
		/// When the sound play signal.
		/// </summary>
		/// <param name="aSoundPlayVO">A sound play V.</param>
		private void _onSoundPlaySignal (SoundPlayVO aSoundPlayVO)
		{

			view.playSound (aSoundPlayVO);
			
		}