(client) feat:主要实现实体的行为树和工作类 (#40)

Co-authored-by: zzdxxz <2079238449@qq.com>
Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
2025-07-21 13:58:58 +08:00
committed by TheRedApricot
parent 389376ec47
commit 28ddcda9a0
87 changed files with 9052 additions and 2504 deletions

View File

@ -0,0 +1,22 @@
using Prefab;
using UnityEngine;
namespace Managers
{
public class Generator:MonoBehaviour
{
public GameObject entityLevel;
public EntityPrefab entityPrefab;
public void GenerateEntity(Data.PawnDef pawnDef, Vector3 pos)
{
if (entityPrefab == null || pawnDef == null)
return;
GameObject entity = Instantiate(entityPrefab.gameObject, pos, Quaternion.identity, entityLevel.transform);
// entity.name = pawnDef.name;
var entityComponent = entity.GetComponent<EntityPrefab>();
entityComponent?.Init(pawnDef);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d78f1b5a44344a4a987e308d3b9478cc
timeCreated: 1752937967