資源簡(jiǎn)介
using UnityEngine; using System.Collections; public class Move : MonoBehaviour { int speed=5; float n=20.1f; // Use this for initialization void Start () { } // Update is called once per frame void Update () { float x = Input.GetAxis ("Horizontal")*Time.deltaTime * speed; float z = Input.GetAxis ("Vertical")*Time.deltaTime * speed; transform.Translate (x,0,z); } }
代碼片段和文件信息
評(píng)論
共有 條評(píng)論