// Use this for initialization void Start() { mc = (MoonCycle)GameObject.FindObjectOfType(typeof(MoonCycle)); rl = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>(); spawnerData = new Dictionary <string, SpawnerData>(); spawnerReset = new Dictionary <string, SpawnerResetTime>(); plants = rl.ingredients.Keys.ToList(); daystrack = mc.Days; SetResetDictionary(); HighMeadowList = new List <string>(); HighForestList = new List <string>(); HighMountainList = new List <string>(); MidMeadowList = new List <string>(); MidForestList = new List <string>(); MidMountainList = new List <string>(); LowMeadowList = new List <string>(); LowForestList = new List <string>(); LowMountainList = new List <string>(); CreateLists(); StartCoroutine(Spawn()); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); shader = gameObject.GetComponentInChildren <CanvasGroup>(); mc = GameObject.FindObjectOfType <MoonCycle>(); fading = false; wasCat = false; if (mc.hour > 17 || mc.hour < 6) { if (player.Status.Contains(Player.PlayerStatus.transformed)) { wasCat = true; shader.alpha = 0.403f; } else { shader.alpha = 0.707f; } } else if (mc.hour == 17) { shader.alpha += 0.101f * (mc.minutes / 10); StartCoroutine(FadeOut()); fading = true; } else if (mc.hour == 6) { shader.alpha = 0.707f; shader.alpha -= 0.101f * (mc.minutes / 10); StartCoroutine(FadeIn()); fading = true; } }
// Use this for initialization void Start() { rl = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>(); plots = new Dictionary <string, PlotData>(); mc = GameObject.Find("Clock").GetComponent <MoonCycle>(); sam = GameObject.FindObjectOfType <SteamAchievementManager>(); StartCoroutine(Grow()); }
void Start() { mc = (MoonCycle)GameObject.FindObjectOfType(typeof(MoonCycle)); rl = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>(); data = new Dictionary <string, NPCData>(); timeSet = false; Spawned = false; queueLoaded = false; returnQueue = new SortedList <NPCData, string>(new CompareTimes()); }
void Start() { mc = GameObject.Find("Clock").GetComponent <MoonCycle>(); mana = GameObject.FindObjectOfType <Mana>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); canvas = Resources.FindObjectsOfTypeAll <SleepCanvas>()[0].gameObject; canvas.SetActive(false); done = false; sleeping = false; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); sm = GameObject.FindObjectOfType <StorageManager>(); rl = GameObject.FindObjectOfType <ResourceLoader>(); bm = GameObject.FindObjectOfType <BrewingManager>(); garden = GameObject.FindObjectOfType <Garden>(); gc = GameObject.FindObjectOfType <GarbageCollecter>(); mc = GameObject.FindObjectOfType <MoonCycle>(); mana = GameObject.FindObjectOfType <Mana>(); npcs = GameObject.FindObjectOfType <NPCController>(); }
private void Start() { //initializations mc = (MoonCycle)GameObject.FindObjectOfType(typeof(MoonCycle)); rl = GameObject.FindGameObjectWithTag("loader").GetComponent <ResourceLoader>(); manager = GameObject.Find("NPCManager").GetComponent <NPCManager>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); waitHour = mc.Hour + maxWait; panel = GameObject.FindGameObjectWithTag("dialogue"); panelCG = panel.GetComponent <CanvasGroup>(); Dialogue = rl.dialogueList[CharacterName]; effects = GameObject.Find("effects"); spawnHour = mc.Hour; spawnMinute = mc.Minutes; chosen = false; //effects.SetActive(false); //set flags visible = false; move = true; wait = true; requested = false; given = null; done = false; asleep = false; responding = false; showButtons = false; currentDialogue = 0; if (!manager.data.TryGetValue(CharacterName, out data)) { data = new NPCManager.NPCData(); data.timesInteracted = 0; data.given = new List <Item>(); data.affinity = 0; data.request = null; manager.data.Add(CharacterName, data); } if (data.returning && data.request != null) { requested = true; rl.requestList.TryGetValue(CharacterName, out requests); dialoguePieces = Dialogue[data.request][0].Split('*'); currentDialogue = dialoguePieces.Length - 1; } //set onclick functions for dialogue panel.transform.Find("Next").GetComponent <Button>().onClick.AddListener(NextDialogue); panel.transform.Find("Exit").GetComponent <Button>().onClick.AddListener(ExitDialogue); panel.transform.Find("Yes").GetComponent <Button>().onClick.AddListener(AcceptRequest); panel.transform.Find("Wait").GetComponent <Button>().onClick.AddListener(Wait); panel.transform.Find("No").GetComponent <Button>().onClick.AddListener(DeclineRequest); }
void Start() { npcQueue = new SortedList <Schedule, string>(new CompareTimes()); NPCQuestFlags = new Dictionary <string, bool>(); NPCQuestFlags.Add("Bernadette", false); NPCQuestFlags.Add("Amara", false); NPCQuestFlags.Add("Geoff", false); NPCQuestFlags.Add("Dante", false); NPCQuestFlags.Add("Ralphie", false); NPCQuestFlags.Add("Franklin", false); //TODO: Might need to move the initilization to fix execution order errors mc = GameObject.FindObjectOfType <MoonCycle>(); pathfinder = GameObject.FindObjectOfType <Pathfinding>(); sceneSwapped = false; SetQueue(0); resetting = false; swapping = false; gaveHint = false; }
// Use this for initialization void Start() { mc = GameObject.Find("Clock").GetComponent <MoonCycle>(); droppedItems = new List <DroppedItemData>(); StartCoroutine(CleanUp()); }
private void Start() { mc = GameObject.Find("Clock").GetComponent <MoonCycle>(); }