void PopulateObjectLists() { //Load Story NPCS. StoryNPC.LoadStoryNPCs(); //Load Filler NPCS. FillerNPC.LoadStoryNPCs(); //Load in Filler carriages. _fillerCarriages.Add(Resources.Load <GameObject>("Carriages/FillerCarriage1")); CogPuzzle.Load3DPuzzlePrefabs(); }
public void PlaceCarriageNPC(FillerNPC npc) { GameObject newNPC = (GameObject)Instantiate(npc.ModelPrefab, NPCPosition.position, NPCPosition.rotation); FillerNPC newFillerNPC = newNPC.AddComponent <FillerNPC>(); newFillerNPC.Name = npc.Name; newFillerNPC.MemoryItemKey = npc.MemoryItemKey; newFillerNPC.MemoryResponseTotal = npc.MemoryResponseTotal; newFillerNPC.InitialDialogueNodeKey = npc.InitialDialogueNodeKey; newFillerNPC.Health = npc.Health; newFillerNPC.Interactable = npc.Interactable; newFillerNPC.NPCDeath += OnNPCDeath; newFillerNPC.OpenDoorNode = npc.OpenDoorNode; newFillerNPC.DialogueDoorOpen += AllPuzzlesComplete; newFillerNPC.NPCDeath += OnNPCDeath; newFillerNPC.transform.parent = transform; }