NPC生成和移动

This commit is contained in:
huyulong 2024-12-12 15:06:30 +08:00
parent 0fc572148d
commit 3465b0042c
5 changed files with 1563 additions and 1446 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1cd831932549f9d4cad2006db7b076c7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4bc999dc543a61148a0ba3bb1dd45a4d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,6 +13,9 @@ public class test : MonoBehaviour
{
public string token;
public WEBScriptListener wEBScriptListener;
public GameObject npc;
public Transform trans;
public class auth_login
{
public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e";
@ -489,7 +492,8 @@ public class test : MonoBehaviour
float x = float.Parse(npcData.X.ToString());
float y = float.Parse(npcData.Y.ToString());
float z = float.Parse(npcData.Z.ToString());
GameObject npc = GameObject.CreatePrimitive(PrimitiveType.Cube);
trans.position = new Vector3(x, y, z);
GameObject.Instantiate(npc, trans);
}
if(npcData.Type == 2)//npcÒÆ¶¯
{

File diff suppressed because it is too large Load Diff