mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-19 23:37:13 +08:00
40 lines
819 B
C#
40 lines
819 B
C#
|
|
using Base;
|
||
|
|
using Data;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace Entity
|
||
|
|
{
|
||
|
|
public class Building:Entity
|
||
|
|
{
|
||
|
|
public override void SetTarget(Vector3 pos)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void TryMove()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|