using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour {

	public Vector3 origPos;
	public float forwardSpeed;
	[HideInInspector] public bool startGame;

	// Use this for initialization
	void Start () {
		startGame = false;
		origPos = transform.position;
	}
	
	// Update is called once per frame
	void Update () {
		if (startGame) {
			float horizontal = Input.GetAxis ("Horizontal");
			float vertical = Input.GetAxis ("Vertical");
			transform.position = new Vector3 (origPos.x, origPos.y, transform.position.z) + new Vector3 (horizontal, vertical, forwardSpeed * Time.deltaTime);
		}
	}
}
