Esempio n. 1
0
    // 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");
    }
Esempio n. 2
0
    // 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);
    }
Esempio n. 3
0
    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);
    }
Esempio n. 4
0
    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);
    }
Esempio n. 5
0
 //This function is used to set the value for the myNPC variable
 public void SetNPC(FriendlyNPC npcReference)
 {
     myNPC = npcReference;
 }
Esempio n. 6
0
 public void HideDialogue()
 {
     this.dialogue.Hide();
     currentNPCInConversation = null;
 }
Esempio n. 7
0
 public void ShowDialogue(FriendlyNPC fromNPC, DialogueLine line)
 {
     this.currentNPCInConversation = fromNPC;
     ShowDialogue(getPortraitFromLine(line), line);
 }
 public void setup()
 {
     uut = new FriendlyNPC(position, stats, movementStrategy, "testName");
 }
Esempio n. 9
0
    // Use this for initialization
    void Start()
    {
        FriendlyNPC friendlyNPC = npcManager.SpawnMostCustomNPC(2, 96, -28.5f, 0, "None", "Pumpkin", "Pumpkin", "Snow", "Pumpkin", "Pumpkin");

        friendlyNPC.SetQuest("EndQuestPlatformer");
    }