1 using UnityEngine; 2 using System.Collections; 3 4 public class Player : MonoBehaviour 5 { private CharacterController controller; 6 public int speed=10; 7 8 void Start(){ 9 controller=GetCompoment();10 }11 12 void Update(){13 controller.SimpleMove(new Vecter3(Input.GetAxis("Horizontal")*speed,0,Input.Getaxis("Vertical")*speed);14 }15 }