This repository has been archived on 2026-01-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Game/Client/Point/Assets/Scripts/PlayerMove.cs

14 lines
352 B
C#

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);
}
}