Exemplo n.º 1
0
        private void Start()
        {
            inputController = GameObject
                              .FindGameObjectWithTag(GlobalConsts.PLAYER_TAG)
                              .GetComponent <InputController>();

            gameContext     = GameObject.FindGameObjectWithTag(GlobalConsts.CONTEXT_TAG);
            inventory       = gameContext.GetComponent <PlayerInventory>();
            questLogger     = gameContext.GetComponent <QuestLogger>();
            dialogueManager = gameContext.GetComponent <DialogueManager>();
        }
Exemplo n.º 2
0
        private void Awake()
        {
            var gameContext = GameObject.FindGameObjectWithTag(GlobalConsts.CONTEXT_TAG);

            questLogger     = gameContext.GetComponent <QuestLogger>();
            dialogueService = gameContext.GetComponent <DialogueService>();

            uiContext = GameObject
                        .FindGameObjectWithTag(GlobalConsts.UI_CONTEXT_TAG)
                        .GetComponent <UIContext>();

            PostActionQueue = new List <DialogueAction>();

            // TODO: Set up a simple animation slide in, as this is a bit crap.
            DialogueBox     = uiContext.dialogueBox;
            ButtonContainer = DialogueBox.transform.Find(GlobalConsts.UI_BUTTON_CONTAINER).gameObject;
            NameField       = DialogueBox.transform.Find(GlobalConsts.UI_NAME_FIELD).GetComponent <Text>();
            DialogueField   = DialogueBox.transform.Find(GlobalConsts.UI_DIALOGUE_FIELD).GetComponent <Text>();

            DialogueBox.SetActive(false);
            ClearButtons();
        }