only ninja NPCs

This commit is contained in:
MrGadget1024 2023-02-24 22:50:34 -05:00
parent 0d6868b693
commit 0d461a8836

View File

@ -38,12 +38,12 @@ void Update()
[Command] [Command]
void CmdSpawnNPC() void CmdSpawnNPC()
{ {
GameObject npc = Instantiate(TestNTNetworkManager.singleton.npcPrefab); //GameObject npc = Instantiate(TestNTNetworkManager.singleton.npcPrefab);
npc.GetComponent<PlayerName>().playerName = "NPC"; //npc.GetComponent<PlayerName>().playerName = "NPC";
npc.GetComponent<CharacterController>().enabled = true; //npc.GetComponent<CharacterController>().enabled = true;
npc.GetComponent<PlayerMove>().enabled = true; //npc.GetComponent<PlayerMove>().enabled = true;
NetworkServer.Spawn(npc); //NetworkServer.Spawn(npc);
NpcList.Add(npc); //NpcList.Add(npc);
GameObject npcNinja = Instantiate(TestNTNetworkManager.singleton.npcNinjaPrefab); GameObject npcNinja = Instantiate(TestNTNetworkManager.singleton.npcNinjaPrefab);
npcNinja.GetComponent<PlayerName>().playerName = "NPC-Ninja"; npcNinja.GetComponent<PlayerName>().playerName = "NPC-Ninja";