// Use this for initialization void Start() { ItemHandler.SpawnItem(sword, 0, 3, 10); FriendlyNPC friendlyNPC = npcManager.SpawnMostCustomNPC(1, 1, 1.5f, 2, "None", "Pumpkin", "Pumpkin", "Snow", "Pumpkin", "Pumpkin"); friendlyNPC.SetQuest("FirstQuest"); }
// Use this for initialization void Start() { FriendlyNPC friendlyNPC = npcManager.SpawnMostCustomNPC(1, 1.5f, 1.5f, 5, "None", "Pumpkin", "Pumpkin", "Snow", "Pumpkin", "Pumpkin"); friendlyNPC.SetQuest("MysteryQuestStart"); ItemHandler.SpawnItemFromString("Sword", 38, 1.2f, -5); }
public FriendlyNPC SpawnMostCustomNPC(int npcType, float x, float y, float z, string hatTexture, string headTexture, string noseTexture, string bodyTexture, string leftLegTexture, string rightLegTexture) { FriendlyNPC friendly = SpawnNPC(npcType, x, y, z); NPCBodyTexturer bodyTexturer = friendly.GetComponent <NPCBodyTexturer> (); bodyTexturer.TextureNPC(hatTexture, headTexture, noseTexture, bodyTexture, leftLegTexture, rightLegTexture); return(friendly); }
public FriendlyNPC SpawnNPC(int npcType, float x, float y, float z) { npcType = Mathf.Clamp(npcType, 0, npcPrefabs.Length); GameObject go = (GameObject)Instantiate(npcPrefabs[npcType]); go.transform.position = new Vector3(x, y, z); FriendlyNPC friendly = go.GetComponent <FriendlyNPC> (); return(friendly); }
//This function is used to set the value for the myNPC variable public void SetNPC(FriendlyNPC npcReference) { myNPC = npcReference; }
public void HideDialogue() { this.dialogue.Hide(); currentNPCInConversation = null; }
public void ShowDialogue(FriendlyNPC fromNPC, DialogueLine line) { this.currentNPCInConversation = fromNPC; ShowDialogue(getPortraitFromLine(line), line); }
public void setup() { uut = new FriendlyNPC(position, stats, movementStrategy, "testName"); }
// Use this for initialization void Start() { FriendlyNPC friendlyNPC = npcManager.SpawnMostCustomNPC(2, 96, -28.5f, 0, "None", "Pumpkin", "Pumpkin", "Snow", "Pumpkin", "Pumpkin"); friendlyNPC.SetQuest("EndQuestPlatformer"); }