/*
 * +================================================================================+
 *      __  ___  ______________  __  __  ______________   ____
 *     / / / / |/ /  _/_  __/\ \/ / / / / /_  __/  _/ /  / __/
 *    / /_/ /    // /  / /    \  / / /_/ / / / _/ // /___\ \
 *    \____/_/|_/___/ /_/     /_/  \____/ /_/ /___/____/___/
 *
 * +================================================================================+
 *
 *    "THE BEER-WARE LICENSE"
 *    -----------------------
 *
 *    As long as you retain this notice you can do whatever you want with this
 *    stuff. However it is expressly forbidden to sell or commercially distribute
 *    Unity Utils or parts of it apart from your games.
 *    If you meet any of the authors some day, and you think this stuff is
 *    worth it, you can buy them a beer in return.
 *
 *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *    THE SOFTWARE.
 *
 * +================================================================================+
 *
 *    Authors:
 *    Michael Müller (mik@mikmueller.ch)
 *
 */

using System;
using UnityEngine;
using System.Collections;

namespace Utils {

public class InputManager : MonoBehaviour {

		//SingeltonShizzle
		private static InputManager _instance;
		
		public static InputManager instance
		{
			get
			{
				if(_instance == null)
				{
					_instance = GameObject.FindObjectOfType<InputManager>();
					
					//Tell unity not to destroy this object when loading a new scene!
					DontDestroyOnLoad(_instance.gameObject);
				}
				
				return _instance;
			}
		}
	
		/// <summary>
		/// The current target platform.
		/// </summary>
		public ITargetPlatform TargetPlatform;

		// Use this for initialization
		void Awake () {

			//Set target platform to Mobile, for OnScreenStick demonstration.
			TargetPlatform = new MobileTargetPlatform ();
		}

		void Start() {
			TargetPlatform.onStart ();
		}
	
		// Update is called once per frame
		void Update () {
			TargetPlatform.onUpdate ();
		}


	}
}