資源簡介
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); } }
代碼片段和文件信息
- 上一篇:c# FlowChart,基于winform
- 下一篇:C#實現左側菜單欄功能
評論
共有 條評論