void Awake() { charactervars = mainchar.GetComponent <mainCharacterVars>(); interact1 = npc1.GetComponent <interact>(); give1 = npc1.GetComponent <npcGiveTask>(); interact2 = npc2.GetComponent <interact>(); give2 = npc2.GetComponent <npcGiveTask>(); interact3 = npc3.GetComponent <interact>(); give3 = npc3.GetComponent <npcGiveTask>(); interact4 = npc4.GetComponent <interact>(); give4 = npc4.GetComponent <npcGiveTask>(); interactWithMarket = market.GetComponent <interactWith>(); interactWithMailman = mailman.GetComponent <interactWith>(); interactWithBank = bank.GetComponent <interactWith>(); interactWithPizza = pizza.GetComponent <interactWith>(); day2timelimitnoti.text = ""; day2notitimer = 8.5f; tutorialtext.text = ""; if (selectedtutorial) { tutorialpos = 0; tutorialbox.SetActive(true); } else { tutorialpos = 25; tutorialbox.SetActive(false); } }
// 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() { 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; } }