using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PleyerControl : MonoBehaviour {
public float speed = 10f;
private Rigidbody2D rb;
void Start () {
rb = GetComponent <Rigidbody2D> ();
}
void Update () {
float moveX = Input.GetAxis ("Horizontal");
rb.MovePosition (rb.position + Vector2.right * speed * moveX * Time.deltaTime);
if (input.GetKeyDown (KeyCode.Space))
rb AddForce = (Vector2.Up * 8000);
}
}