コード例 #1
0
        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);
        }
コード例 #2
0
        void OnEnable()
        {
            _instance = this;
            var quests = QuestStorage.GetQuests();

            foreach (var quest in quests)
            {
                quest.QuestCompleted += QuestCompleted;
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 private void Start()
 {
     _quest = QuestStorage.GetQuestById(QuestId);
 }