NPCtext2
This commit is contained in:
parent
d98d907ca2
commit
fd4087570c
@ -9,7 +9,7 @@ using Google.Protobuf;
|
||||
using System.Net.WebSockets;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using static UnityEditor.Progress;
|
||||
|
||||
public class test : MonoBehaviour
|
||||
{
|
||||
public string token;
|
||||
@ -567,17 +567,15 @@ public class test : MonoBehaviour
|
||||
//}
|
||||
foreach (var npcDict in NPCController.instance.npcsList)
|
||||
{
|
||||
// 遍历每个字典中的键值对
|
||||
foreach (var kvp in npcDict)
|
||||
{
|
||||
RecuseNpc npc = kvp.Key; // 获取 NPC 脚本(键)
|
||||
Vector3 position = kvp.Value; // 获取 NPC 的位置(值)
|
||||
|
||||
// 在这里,你可以使用 npc 和 position 进行其他操作
|
||||
if (npcData.UserId == npc.npcId)
|
||||
{
|
||||
//Debug.Log("================" + v);
|
||||
npc.SetNpcDes(v);
|
||||
Debug.Log($"NPCID{npcData.UserId}NPCPOSITION{v}");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user