2025-08-11 12:45:52 +08:00
|
|
|
using Base;
|
|
|
|
using Data;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace Entity
|
|
|
|
{
|
|
|
|
public class Building:Entity
|
|
|
|
{
|
|
|
|
public override void SetTarget(Vector3 pos)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2025-08-14 13:26:02 +08:00
|
|
|
public override void TryMove()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2025-08-11 12:45:52 +08:00
|
|
|
protected override void UpdatePlayerControls()
|
|
|
|
{
|
|
|
|
if (Input.GetKeyDown(KeyCode.W))
|
|
|
|
{
|
|
|
|
transform.position += Vector3.up;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.A))
|
|
|
|
{
|
|
|
|
transform.position += Vector3.left;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.S))
|
|
|
|
{
|
|
|
|
transform.position += Vector3.down;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.D))
|
|
|
|
{
|
|
|
|
transform.position += Vector3.right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|