
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour {
void Start () {
}
void Update (){
moveLeft ();
moveRight ();
}
public void moveLeft()
{
this.GetComponent<Rigidbody2D>().AddForce(new Vector2(-150f, 0f));
}
public void moveRight()
{
this.GetComponent<Rigidbody2D>().AddForce(new Vector2(150f, 0f));
}
}