feat unity point客户端初始化
This commit is contained in:
14
Client/Point/Assets/Scripts/PlayerMove.cs
Normal file
14
Client/Point/Assets/Scripts/PlayerMove.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerMove : MonoBehaviour
|
||||
{
|
||||
public float moveSpeed = 5f; // 移动速度
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var moveX = Input.GetAxis("Horizontal") * moveSpeed * Time.deltaTime;
|
||||
var moveY = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
|
||||
|
||||
transform.Translate(moveX, moveY, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user