private static void ShowUI(string id) { var quest = QuestStorage.GetQuestById(id); _instance._activeQuests.Add(quest); FanfareMessage.ShowWithText(string.Format("Задание принято:{0}", quest.Description)); AudioSource.PlayClipAtPoint(_instance.QuestAccepted, Vector3.zero, 1f); }
void OnEnable() { _instance = this; var quests = QuestStorage.GetQuests(); foreach (var quest in quests) { quest.QuestCompleted += QuestCompleted; } }
private static void ShowUI(string id) { var quest = QuestStorage.GetQuestById(id); if (!_instance._activeQuests.Contains(quest)) { _instance._activeQuests.Add(quest); FanfareMessage.ShowWithText(string.Format("Quest accepted:{0}", quest.Description)); AudioSource.PlayClipAtPoint(_instance.QuestAccepted, Camera.main.transform.position, 1f); } }
private void Start() { _quest = QuestStorage.GetQuestById(QuestId); }