(client):feat:添加对列表定义读取的支持,ui管理器将对没有键的窗口也进行统一管理

This commit is contained in:
m0_75251201
2025-07-20 15:21:21 +08:00
parent 2e74833a18
commit 9dcc67d710
77 changed files with 2158 additions and 3750 deletions

View File

@ -0,0 +1,35 @@
using System.Collections.Generic;
using Base;
using UnityEngine;
namespace Entity
{
public abstract class Entity:MonoBehaviour,ITick
{
public bool playerControlled = false;
public List<AIBase> aiTree=new();
public Data.AttributesDef runtimeAttributes;
public Vector3 direction;
public void Tick()
{
foreach (var aiBase in aiTree)
{
if (aiBase.Run(this))
break;
}
}
public virtual void TryAttck()
{
}
public virtual void OnHit(Entity from)
{
var hit = from.runtimeAttributes.attack - runtimeAttributes.defense;
if (hit < 0)
hit = from.runtimeAttributes.attack / 100;
runtimeAttributes.health -= hit;
}
}
}