예제 #1
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, "You find yourself asleep in a strange land. " +
                                   "Although it seems that you are still in the embrace of a dream, you have been whisked " +
                                   "far, far away from your homeland. For what purpose or by whom remains unknown, " +
                                   "but now is not the time for speculation. Now is the time for awakening...", 2f);
                break;

            case 1:
                // Breaks out of the game.
                end();
                break;
            }
        }
예제 #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;
            }
        }
예제 #3
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;
            }
        }
예제 #4
0
 public void newGame()
 {
     // Gets the spawn point of Lark, and acquires Lark himself.
     lark       = GameObject.Find("Player");
     larkScript = (Lark)lark.GetComponent(typeof(Lark));
     spawnPoint = GameObject.Find("Story Spawn 1");
     respawnX   = spawnPoint.transform.position.x;
     respawnY   = spawnPoint.transform.position.y;
     // Gets the pause screen script.
     pScreen = (PauseScreen)GameObject.Find("Pause Screen").GetComponent(typeof(PauseScreen));
     // Gets the mask that exists in the game.
     mask = GameObject.Find("Mask");
     // Gets the dialogue handler.
     dHandler = (DialogueHandler)GameObject.Find("Textbox").GetComponent(typeof(DialogueHandler));
     // Gets the character handler.
     cHandler = (CharacterHandler)GameObject.Find("Characters").GetComponent(typeof(CharacterHandler));
     // If a new game, sets all stages to zero initially.
     for (int i = 0; i < 50; i++)
     {
         stages [i] = 0;
     }
     // DEBUG PURPOSES.
     items.Add(new Herb());
 }
예제 #5
0
 // Sets the dialogue handler for input.
 public void setDialogueHandler(DialogueHandler dHandler)
 {
     this.dHandler = dHandler;
 }