npc的状态

This commit is contained in:
huyulong 2024-12-23 09:55:15 +08:00
parent e68872263e
commit 598d2ebc44
3 changed files with 49 additions and 49 deletions

View File

@ -5664,6 +5664,52 @@ Transform:
m_CorrespondingSourceObject: {fileID: 461292, guid: 96758bdbc4a29cd40a7572aed98ada0c, type: 3}
m_PrefabInstance: {fileID: 233169427}
m_PrefabAsset: {fileID: 0}
--- !u!1 &233356217
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 233356219}
- component: {fileID: 233356218}
m_Layer: 0
m_Name: BurstCollisionWorld
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &233356218
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 233356217}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
m_Name:
m_EditorClassIdentifier:
cellSpans:
m_AlignBytes: 16
--- !u!4 &233356219
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 233356217}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 38
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &246032604
PrefabInstance:
m_ObjectHideFlags: 0
@ -25534,52 +25580,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 401048, guid: 6a749781e5f719745a7ea468af7bc0d7, type: 3}
m_PrefabInstance: {fileID: 1542437476}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1545698124
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1545698126}
- component: {fileID: 1545698125}
m_Layer: 0
m_Name: BurstCollisionWorld
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1545698125
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1545698124}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
m_Name:
m_EditorClassIdentifier:
cellSpans:
m_AlignBytes: 16
--- !u!4 &1545698126
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1545698124}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 38
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!64 &1546963728
MeshCollider:
m_ObjectHideFlags: 0
@ -27107,7 +27107,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!81 &1707678917
AudioListener:
m_ObjectHideFlags: 0

View File

@ -11,7 +11,7 @@ public class NPCController : MonoBehaviour
public List<Dictionary<RecuseNpc,Vector3>> npcsList = new List<Dictionary<RecuseNpc, Vector3>>();//存放每个生成的npc的脚本
public GameObject npc;//npc人物预制体
public List<Vector3> npcposition = new List<Vector3>();//存放每个生成的npc位置
public List<Vector3> npcposition = new List<Vector3>();//存放每个生成的npc位置

View File

@ -49,7 +49,7 @@ public class RecuseNpc : MonoBehaviour
navMeshAgent = GetComponent<NavMeshAgent>();
// 初始化 NavMeshAgent 的一些属性
navMeshAgent.speed = 3.5f; // 设置速度
navMeshAgent.speed = 2f; // 设置速度
navMeshAgent.acceleration = 8f; // 设置加速度
navMeshAgent.angularSpeed = 120f; // 设置旋转速度
navMeshAgent.stoppingDistance = 1f; // 设置停止的距离