Exemple #1
0
        protected override void message()
        {
            switch (stage)
            {
            case 0:
                // Creates the dialogue alerting the player that he has received an item.
                DialogueHandler dHandler = storage.getDialogueHandler();
                dHandler.startText(gHandler, storage, this, item.getMessage(), 0f);
                break;

            case 1:
                // Adds the item to the quest item list or the item list.
                if (item is QuestItem)
                {
                    storage.addQuestItem((QuestItem)item);
                }
                else
                {
                    storage.addItem(item);
                }

                // If there is a second event, launches it.
                if (sEvent != null)
                {
                    gHandler.setCurrentEvent(sEvent);
                    sEvent.begin();
                }
                // Else, Breaks out of the game.
                else
                {
                    end();
                }
                break;

            case 2:
                end();
                break;
            }
        }
Exemple #2
0
        protected override void message()
        {
            switch (stage)
            {
            case 0:
                // Creates the initial dialogue for the game.
                DialogueHandler dHandler = storage.getDialogueHandler();
                dHandler.startText(gHandler, storage, this, text, 0f);
                break;

            case 1:
                // Breaks out of the game.
                end();
                // If there is a second event, launches it.
                if (sEvent != null)
                {
                    gHandler.setCurrentEvent(sEvent);
                    sEvent.begin();
                }
                break;
            }
        }