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

public class PlayerController : MonoBehaviour {
	public float Speed;
	private Rigidbody rb;

	private void Start()
	{
		rb = GetComponent<Rigidbody>();
	}
	public void FixedUpdate()
	{
		Vector3 move = new Vector3(Input.GetAxis("Horizontal"), 0f, Input.GetAxis("Vertical"));

		if (transform.position.y == 0.5f && Input.GetButtonDown("Jump"))
		{
			move = new Vector3(Input.GetAxis("Horizontal"), 100f, Input.GetAxis("Vertical"));
		}
		rb.AddForce(move * Speed);
	}
}
