示例#1
0
        void Start()
        {
            mUniqueId = GetComponent <UniqueId>();

            Dictionary <string, QuestGiver.SavedState> questGivers = GameController.Instance.questGivers;

            if (questGivers.ContainsKey(mUniqueId.guid))
            {
                SavedState state = questGivers[mUniqueId.guid];
                if (state.allFinished)
                {
                    endQuestElement = null;
                }
            }
        }
示例#2
0
        public override void Interact()
        {
            var gameController = GameController.Instance;

            if (gameController.activeQuests.Contains(quest))
            {
                return;
            }

            if (!gameController.completedQuests.Contains(quest))
            {
                startQuestElement.Run();
            }
            else
            {
                endQuestElement.Run();
                endQuestElement = null;

                SavedState s = new SavedState();
                s.allFinished = true;
                GameController.Instance.questGivers[mUniqueId.guid] = s;
            }
        }
示例#3
0
 public void DisplayDialogMessage(string message, AbstractQuestElement next)
 {
     state                  = State.DialogMessage;
     mNextQuestElement      = next;
     dialogMessageText.text = message;
 }