using UnityEngine;
using System.Collections;

public class MOVE : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	if (Input.GetKey(KeyCode.W)) {
			transform.rotation=Quaternion.Euler(new Vector3(transform.rotation.x,transform.rotation.y,180));
			transform.position=new Vector2(transform.position.x,transform.position.y+0.05f);
		}
		if (Input.GetKey(KeyCode.S)) {
			transform.rotation=Quaternion.Euler(new Vector3(transform.rotation.x,transform.rotation.y,0));
			transform.position=new Vector2(transform.position.x,transform.position.y-0.05f);
		}
		if (Input.GetKey(KeyCode.A)) {
			transform.rotation=Quaternion.Euler(new Vector3(transform.rotation.x,transform.rotation.y,-90));
			transform.position=new Vector2(transform.position.x-0.05f,transform.position.y);
		}
		if (Input.GetKey(KeyCode.D)) {
			transform.rotation=Quaternion.Euler(new Vector3(transform.rotation.x,transform.rotation.y,90));
			transform.position=new Vector2(transform.position.x+0.05f,transform.position.y);
		}
	}
}
