(client) feat:健康给予,路径优化,结算界面,商店界面 (#60)

Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com>
Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
This commit is contained in:
2025-10-10 14:08:23 +08:00
parent 9a797479ff
commit 16b49f3d3a
1900 changed files with 114053 additions and 34157 deletions

View File

@@ -6,8 +6,8 @@ namespace Entity
{
public class Building : CombatantEntity
{
private BuildingOutline buildingOutline;
private BuildingDef buildingDef;
private BuildingOutline buildingOutline;
public override void Init(EntityDef entityDefine)
{
@@ -16,8 +16,9 @@ namespace Entity
buildingOutline = entityPrefab.outline as BuildingOutline;
}
public override void SetTarget(Vector3 pos)
public override bool SetTarget(Vector3 pos)
{
return false;
}
public override void TryMove()
@@ -26,25 +27,13 @@ namespace Entity
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;
}
// 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;
}
public override void Tick()
@@ -52,12 +41,8 @@ namespace Entity
base.Tick();
if (buildingDef.triggerEvents != null && buildingOutline.PlayerOnGround &&
Input.GetKeyDown(buildingDef.activateKey))
{
foreach (var eventDef in buildingDef.triggerEvents)
{
EventManager.Instance.Action(eventDef, this);
}
}
}
}
}