using UnityEngine;
using System.Collections;

public class ColorPlayerScript : Inputable {

    Player myPlayerScript;
    [SerializeField] private Vector2 center;
    [SerializeField] private float distance;

	// Use this for initialization
	void Start () {
        InputManager.AttachPlayer(this, 0);
        GetComponent<SpriteRenderer>().enabled = false;

    }
	
	// Update is called once per frame
	void Update () {
        if(Input.GetKeyDown(KeyCode.JoystickButton0))
        {
            GetComponent<SpriteRenderer>().enabled = true;
        }
    }

    public override void ThumbstickLeft(float vert, float horiz)
    {
        transform.position = center + new Vector2(horiz * distance, vert * distance);
    }
}
