(client) feat:实体的手动控制
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using AI;
|
||||
using Base;
|
||||
using Data;
|
||||
using Entity;
|
||||
using Unity.VisualScripting;
|
||||
@ -10,10 +11,16 @@ namespace Prefab
|
||||
public class EntityPrefab : MonoBehaviour
|
||||
{
|
||||
public Entity.Entity entity;
|
||||
public Outline outline;
|
||||
|
||||
|
||||
public void Init(Data.PawnDef pawnDef)
|
||||
{
|
||||
entity.runtimeAttributes = pawnDef.attributes.Clone();
|
||||
entity.aiTree = ConvertToAIBase(pawnDef.behaviorTree);
|
||||
|
||||
outline.Init();
|
||||
outline.Hide();
|
||||
}
|
||||
public static AIBase ConvertToAIBase(BehaviorTreeDef behaviorTreeDef)
|
||||
{
|
||||
|
Reference in New Issue
Block a user