// Start is called before the first frame update void Start() { text = GameObject.FindGameObjectWithTag("Canvas").transform.Find("Dialogue Panel").Find("DialogueText").GetComponent <Text>(); currentDialogue = GameObject.FindGameObjectWithTag("Canvas").transform.Find("Dialogue Panel").GetComponent <CurrentDialogue>(); interaction = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <Interaction>(); currentQuests = GameObject.FindGameObjectWithTag("GameData").GetComponent <CurrentQuests>(); }
// Start is called before the first frame update void Start() { PlayerMove = transform.GetComponentInParent <PlayerMove>(); direction = transform.right; foreach (Transform transform in GameObject.FindGameObjectWithTag("Canvas").GetComponentsInChildren <Transform>()) { if (transform.name == "InteractText") { InteractText = transform.GetComponent <Text>(); } else if (transform.tag == "DialoguePanel") { DialoguePanel = transform.gameObject; currentDialogue = transform.GetComponent <CurrentDialogue>(); } } foreach (Transform transform in GameObject.FindGameObjectWithTag("DontDestroyCanvas").GetComponentsInChildren <Transform>()) { if (transform.tag == "InventoryPanel") { inventory = transform.GetComponent <Inventory>(); } } currentQuests = GameObject.FindGameObjectWithTag("GameData").GetComponent <CurrentQuests>(); InteractText.gameObject.SetActive(false); DialoguePanel.SetActive(false); }
public void CancelQuest([NotNull] IQuest quest) { if (quest == null) throw new ArgumentNullException(nameof(quest)); var idx = CurrentQuests.FindIndex(q => q == quest); if (idx < 0) return; quest.Deactivate(); SaveDataManager.instance.SaveData.currentQuests.Remove(quest); SaveDataManager.instance.ApplyToFile(); OnQuestCanceled(quest); }
private void NextItemButton_Click(object sender, RoutedEventArgs e) { int start = 0; if (_currentSelection != null) { start = CurrentQuests.IndexOf(_currentSelection); } SearchQuests(SearchQuery, start, SearchDirection.Forward); }
// Start is called before the first frame update void Start() { currentQuests = transform.GetComponent <CurrentQuests>(); }
// Start is called before the first frame update void Start() { dictionary.Add(MonsterType.Slime, 0); dictionary.Add(MonsterType.Wolf, 0); currentQuests = transform.GetComponent <CurrentQuests>(); }