using UnityEngine;
using System.Collections;

public class InputTestWindows : MonoBehaviour 
{
	public int player = 1;

	void Update () 
	{
		//left thumbstick
		if(Input.GetAxis("LHorizontal" + player) == -1){
			print("left left P" + player);
		}
		if(Input.GetAxis("LHorizontal" + player) == 1){
			print("left right P" + player);
		}
		if(Input.GetAxis("LVertical" + player) == -1){
			print("left up P" + player);
		}
		if(Input.GetAxis("LVertical" + player) == 1){
			print("left down P" + player);
		}
		if(Input.GetButton("LThumb" + player)){
			print("left thumbstick P" + player);
		}
			
		//right thumbstick
		if(Input.GetAxis("RHorizontal" + player) == -1){
			print("right left P" + player);
		}
		if(Input.GetAxis("RHorizontal" + player) == 1){
			print("right right P" + player);
		}
		if(Input.GetAxis("RVertical" + player) == -1){
			print("right up P" + player);
		}
		if(Input.GetAxis("RVertical" + player) == 1){
			print("right down P" + player);
		}
		if(Input.GetButton("RThumb" + player)){
			print("right thumbstick P" + player);
		}
			
		//buttons
		if(Input.GetButtonUp("ButtonA" + player)){
			print("a button P" + player);
		}
        if (Input.GetButtonUp("ButtonB" + player)) {
			print("b button P" + player);
		}
        if (Input.GetButtonUp("ButtonX" + player)) {
			print("x button P" + player);
		}
        if (Input.GetButtonUp("ButtonY" + player)) {
			print("y button P" + player);
		}
			
		//center buttons
        if (Input.GetButtonUp("Back" + player)) {
			print("back P" + player);
		}
        if (Input.GetButtonUp("Start" + player)) {
			print("start P" + player);
		}
			
		//bumpers
        if (Input.GetButtonUp("LBump" + player)) {
			print("left bumper P"+ player);
		}
        if (Input.GetButtonUp("RBump" + player)) {
			print("right bumper P" + player);
		}
			
		//triggers
		if(Input.GetAxis("LTrigger" + player) == 1){
			print("left trigger P" + player);
		}
		if(Input.GetAxis("RTrigger" + player) == 1){
			print("right trigger P" + player);
		}

		//D-Pad
		if(Input.GetAxis("DHPad" + player) == -1){
			print("d-pad left P" + player);
		}
		if(Input.GetAxis("DHPad" + player) == 1){
			print("d-pad right P" + player);
		}
		if(Input.GetAxis("DVPad" + player) == 1){
			print("d-pad up P" + player);
		}
		if(Input.GetAxis("DVPad" + player) == -1){
			print("d-pad down P" + player);
		}
	}
}
