// Use this for initialization void Start() { characterVars = maincharacter.GetComponent <mainCharacterVars>(); friend1 = npc1.GetComponent <npcfriendship>(); daycount1 = npc1.GetComponent <npcGiveTask>(); friend2 = npc2.GetComponent <npcfriendship>(); daycount2 = npc2.GetComponent <npcGiveTask>(); friend3 = npc3.GetComponent <npcfriendship>(); daycount3 = npc3.GetComponent <npcGiveTask>(); friend4 = npc4.GetComponent <npcfriendship>(); daycount4 = npc4.GetComponent <npcGiveTask>(); translate = Translator.GetComponent <translator>(); }
void Awake() { dictRef = mainScriptMan.GetComponent <dictInitialize>(); mainCharacterVars = mainCharacter.GetComponent <mainCharacterVars>(); interact = GetComponent <interact>(); npcConversation = GetComponent <npcConversation>(); interactWithMarket = market.GetComponent <interactWith>(); interactWithMailman = mailman.GetComponent <interactWith>(); interactWithBank = bank.GetComponent <interactWith>(); interactWithPizza = pizza.GetComponent <interactWith>(); interactWithMayor = mayor.GetComponent <interactWith>(); interactWithShady = shadyCharacter.GetComponent <interactWith>(); friendship = GetComponent <npcfriendship>(); easyTaskPrompts[0].construct(new List <string> { "bring", " ", "this", " ", "mail", " ", "to", " ", "the", " ", "post office" }, "post office", "mail"); easyTaskPrompts[1].construct(new List <string> { "bring", " ", "this", " ", "money", " ", "to", " ", "the", " ", "bank" }, "bank", "money"); easyTaskPrompts[2].construct(new List <string> { "bring", " ", "this", " ", "document", " ", "to", " ", "the", " ", "town hall" }, "town hall", "document"); easyTaskPrompts[3].construct(new List <string> { "bring", " ", "these", " ", "good", "s", " ", "to", " ", "the", " ", "alley" }, "alley", "good"); //mediTaskPrompts[0].construct(new List<string> { "tell", " ", "me", " ", "where", " ", "you", " ", "are", " ", "from" }, "currentNPC", "whereFrom"); hardTaskPrompts[0].construct(new List <string> { "I", " ", "need", " ", "meat", " ", "from", " ", "the", " ", "market" }, "market", "meat"); hardTaskPrompts[1].construct(new List <string> { "I", " ", "need", " ", "bread", " ", "from", " ", "the", " ", "market" }, "market", "bread"); hardTaskPrompts[2].construct(new List <string> { "I", " ", "need", " ", "grape", "s", " ", "from", " ", "the", " ", "market" }, "market", "grape"); hardTaskPrompts[3].construct(new List <string> { "get", " ", "me", " ", "a", " ", "pizza", " ", "with", " ", "meat" }, "pizza", "meat"); hardTaskPrompts[4].construct(new List <string> { "get", " ", "me", " ", "a", " ", "pizza", " ", "with", " ", "tomato" }, "pizza", "tomato"); hardTaskPrompts[5].construct(new List <string> { "get", " ", "me", " ", "a", " ", "pizza", " ", "with", " ", "olive", "s" }, "pizza", "olive"); //hardTaskPrompts[0].construct(new List<string> { "tell", " ", "him", " ", "to", " ", "come", " ", "over", " ", "here" }, "otherNPC", "come"); taskavailable.SetActive(false); taskwiththisNPC = false; taskinprog.SetActive(false); completed = false; almostdonestar.SetActive(false); }
void Awake() { giveTask = GetComponent <npcGiveTask>(); mainCharacterVars = mainCharacter.GetComponent <mainCharacterVars>(); npcFriendship = GetComponent <npcfriendship>(); dictInitialize = mainScriptMan.GetComponent <dictInitialize>(); SpeechBubble.enabled = false; selectTaskEasyButton.active = false; selectTaskHardButton.active = false; defaultTextColor = dialogue.color; dialogue.supportRichText = true; }
void Start() { int letter; win.enabled = false; Wordlearned1.enabled = false; textOnScreen = false; gameDict = new List <Word>(); Debug.Log(previousdict.ToString()); if (previousdict != true) { List <string> scrambling = new List <string>(); List <string> engDict = new List <string> { " ", "task", ",", "?", "!", "market", "I", "no", "easy", "hard", ".", "more", "grape", "olive", "tomato", "money", "deliver", "or", "for", "buy", "bank", "ing", "meat", "bread", "from", "the", "need", "bring", "this", "mail", "food", "to", "carrier", "friend", "my", "picnic", "one", "up", "coming", "right", "get", "pizza", "with", "and", "me", "you", "here", "like", "thank", "sorry", "deposit", "that", "not", "what", "want", "have", "today", "weather", "nice", "it", "birthday", "are", "how", "took", "too", "long", "is", "having", "a", "an", "later", "just", "busy", "am", "tired", "do", "think", "we", "live", "in", "simulation", "town", "mayor", "post office", "apartment", "be", "these", "good", "alley", "town hall", "document", "s", "hey", "buddy", "where" }; for (int i = 0; i < engDict.Count; i++) { Word newWord = new Word(); newWord.engWord = engDict[i]; for (int j = 0; j < engDict[i].Length; j++) { letter = Random.Range(0, 25); scrambling.Add(alphabet[letter].ToString()); } newWord.scrambledWord = string.Join(string.Empty, scrambling.ToArray()); newWord.unlocked = 0; if (newWord.scrambledWord == "f**k" || newWord.scrambledWord == "shit") { i--; newWord = null; Debug.Log("profanity avoided"); } else { gameDict.Add(newWord); scrambling.Clear(); } } wordsLeftToUnlock = gameDict.Count; for (int i = 0; i < 12; i++) { gameDict[i].unlocked = 100; wordsLeftToUnlock--; } } else { friend1 = npc1.GetComponent <npcfriendship>(); friend2 = npc2.GetComponent <npcfriendship>(); friend3 = npc3.GetComponent <npcfriendship>(); friend4 = npc4.GetComponent <npcfriendship>(); givetask1 = npc1.GetComponent <npcGiveTask>(); givetask2 = npc2.GetComponent <npcGiveTask>(); givetask3 = npc3.GetComponent <npcGiveTask>(); givetask4 = npc4.GetComponent <npcGiveTask>(); friend1.FriendLevel = LoadGame.npc1friendlevel; friend2.FriendLevel = LoadGame.npc2friendlevel; friend3.FriendLevel = LoadGame.npc3friendlevel; friend4.FriendLevel = LoadGame.npc4friendlevel; givetask1.dayCount = LoadGame.npc1daycount; givetask2.dayCount = LoadGame.npc2daycount; givetask3.dayCount = LoadGame.npc3daycount; givetask4.dayCount = LoadGame.npc4daycount; gameDict.AddRange(LoadGame.tempdict); wordsLeftToUnlock = LoadGame.tempwordstounlock; } }