NPC生成和移动
This commit is contained in:
parent
0fc572148d
commit
3465b0042c
8
xiaofang/Assets/Prefabs/HYLPrefabs/NPC.meta
Normal file
8
xiaofang/Assets/Prefabs/HYLPrefabs/NPC.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1cd831932549f9d4cad2006db7b076c7
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
1491
xiaofang/Assets/Prefabs/HYLPrefabs/NPC/Vang Variant.prefab
Normal file
1491
xiaofang/Assets/Prefabs/HYLPrefabs/NPC/Vang Variant.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4bc999dc543a61148a0ba3bb1dd45a4d
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -13,6 +13,9 @@ public class test : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public string token;
|
public string token;
|
||||||
public WEBScriptListener wEBScriptListener;
|
public WEBScriptListener wEBScriptListener;
|
||||||
|
public GameObject npc;
|
||||||
|
public Transform trans;
|
||||||
|
|
||||||
public class auth_login
|
public class auth_login
|
||||||
{
|
{
|
||||||
public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e";
|
public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e";
|
||||||
@ -489,7 +492,8 @@ public class test : MonoBehaviour
|
|||||||
float x = float.Parse(npcData.X.ToString());
|
float x = float.Parse(npcData.X.ToString());
|
||||||
float y = float.Parse(npcData.Y.ToString());
|
float y = float.Parse(npcData.Y.ToString());
|
||||||
float z = float.Parse(npcData.Z.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ÒÆ¶¯
|
if(npcData.Type == 2)//npcÒÆ¶¯
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user