using UnityEngine;
using System.Collections;

public class InputManager : SingletonMonoBehaviour<InputManager> {
	private Vector2 lasttouch = Vector2.zero;
	private bool isclick = false;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		isclick = Input.GetKeyDown (KeyCode.Mouse0);
		if (isclick) {
			lasttouch = Input.mousePosition;
		}
	}

	public bool isClick(){
		return isclick;
	}

	public Vector2 getClickPosition(){
		return lasttouch;
	}

	public Vector2 getClickMultiple(){
		Vector2 mult = new Vector2 ();
		mult.x = lasttouch.x / (float)Screen.width;
		mult.y = lasttouch.y / (float)Screen.height;
		return mult;
	}
}
