Пример #1
0
    private void SetUpShopKeeperNPC()
    {
        Instantiate(shopKeeperNPC, new Vector3(30, -4, 0), Quaternion.identity);
        GameObject NPCInstance = GameObject.Find("ShopKeeper2NPC(Clone)");

        shopKeeperNPCScript = NPCInstance.GetComponent <WanderingTalkingNPC>();
    }
Пример #2
0
    private void SetupButterflyGirlNPC()
    {
        Instantiate(butterflyGirlNPC, new Vector3(34, 2, 0), Quaternion.identity);
        GameObject NPCInstance = GameObject.Find("ButterflyGirl2NPC(Clone)");

        butterflyGirlNPCScript = NPCInstance.GetComponent <WanderingTalkingNPC>();
    }
Пример #3
0
    private void SetupSurfer()
    {
        Instantiate(surferDudeNPC, new Vector3(20, -22, 0), Quaternion.identity);
        GameObject NPCInstance = GameObject.Find("SurferDudeNPC(Clone)");

        surferNPCScript = NPCInstance.GetComponent <WanderingTalkingNPC>();
    }
Пример #4
0
    private void SetupButterflyGirl()
    {
        Instantiate(butterflyGirl, new Vector3(34, -6, 0), Quaternion.identity);
        GameObject NPCInstance = GameObject.Find("ButterflyGirlNPC(Clone)");

        talkingNPCScript        = NPCInstance.GetComponent <WanderingTalkingNPC>();
        talkingNPCScript.gender = WanderingTalkingNPC.Gender.Female;
    }
Пример #5
0
 private void MoveNPC(Transform npc, WanderingTalkingNPC npcScript, int x, int y, string speech)
 {
     npc.position = new Vector3(x, y, 0);
     npcScript.dialogue.sentences[0] = speech;
     npcScript.dialogue.sentences[1] = speech;
     npcScript.walkTime = 0f;
     npcScript.speed    = 0f;
 }
Пример #6
0
    private void SetUpNewMumNPC()
    {
        Instantiate(mumNPC, new Vector3(-7, 10, 0), Quaternion.identity);
        GameObject NPCInstance = GameObject.Find("MumNPC(Clone)");

        mumNPCScript        = NPCInstance.GetComponent <WanderingTalkingNPC>();
        mumNPCScript.gender = WanderingTalkingNPC.Gender.Female;
    }
Пример #7
0
    // Start is called before the first frame update
    void Start()
    {
        rb           = following.GetComponent <Rigidbody2D>();
        wanderScript = mob.GetComponent <WanderingTalkingNPC>();
        walkTime     = wanderScript.walkTime;
        waitTime     = wanderScript.waitTime;
        wanderSpeed  = wanderScript.speed;


        playerInventory = player.GetComponent <Inventory>();
    }
Пример #8
0
    public override void RunStartUpLogicForObjective()
    {
        portTalkingScript = portWorker.GetComponent <WanderingTalkingNPC>();
        portWalkingScript = portWorker.GetComponent <WalkingNPC>();
        playerInventory   = player.GetComponent <Inventory>();

        portWalkingScript.walkDirection = 1;
        portWalkingScript.walkTime      = 4;
        portWalkingScript.speed         = 3;

        portTalkingScript.canTalk = true;
    }
Пример #9
0
    public override void RunStartUpLogicForObjective()
    {
        factoryWorkerScript         = factoryWorker.GetComponent <WanderingTalkingNPC>();
        factoryWorkerScript.canTalk = true;

        npcScript1 = citizen1.GetComponent <WanderingTalkingNPC>();
        npcScript2 = citizen2.GetComponent <WanderingTalkingNPC>();
        npcScript3 = citizen3.GetComponent <WanderingTalkingNPC>();
        npcScript4 = citizen4.GetComponent <WanderingTalkingNPC>();
        npcScript5 = citizen5.GetComponent <WanderingTalkingNPC>();

        MoveNPC(citizen1, npcScript1, 71, -6, "Some climate change slogan");
        MoveNPC(citizen2, npcScript2, 72, -3, "Some climate change slogan");
        MoveNPC(citizen3, npcScript3, 67, -7, "Some climate change slogan");
        MoveNPC(citizen4, npcScript4, 74, -7, "Some climate change slogan");
        MoveNPC(citizen5, npcScript5, 70, -3, "Some climate change slogan");
    }
Пример #10
0
 public override void RunStartUpLogicForObjective()
 {
     sushiDaughterScript = sushiDaughter.GetComponent <WanderingTalkingNPC>();
 }
Пример #11
0
 public override void RunStartUpLogicForObjective()
 {
     ecoWorkerScript         = ecoWorker.GetComponent <WanderingTalkingNPC>();
     ecoWorkerScript.canTalk = true;
 }
Пример #12
0
 public override void RunStartUpLogicForObjective()
 {
     Instantiate(bigBoss, new Vector3(71, -16, 0), Quaternion.identity);
     bossScript = bigBoss.GetComponent <WanderingTalkingNPC>();
 }
Пример #13
0
 private void Awake()
 {
     mumNPCScript = mumNPC.GetComponent <WanderingTalkingNPC>();
 }
Пример #14
0
 private void SetMoving(WanderingTalkingNPC script)
 {
     script.speed    = 3f;
     script.walkTime = 3f;
     script.waitTime = 1f;
 }
Пример #15
0
 public override void RunStartUpLogicForObjective()
 {
     Instantiate(newEcoWorker, oldEcoWorker.position, Quaternion.identity);
     ecoWorkerScript = newEcoWorker.GetComponent <WanderingTalkingNPC>();
     Destroy(oldEcoWorker.gameObject);
 }