Esempio n. 1
0
        public void Investigate()
        {
            this.Room = world.Dungeon[(int)RoomIndex.x, (int)RoomIndex.y];

            encounter.ResetDynamicControls();

            if (this.Room.Empty)
            {
                Journal.Instance.Log("You find yourself in an empty room");
            }
            else if (this.Room.Chest != null)
            {
                Journal.Instance.Log("You've found a chest! What would you like to do?");
                encounter.StartChest();
            }
            else if (this.Room.Enemy != null)
            {
                Journal.Instance.Log("You are jumped by a " + this.Room.Enemy.Description + "! What would you like to do?");
                encounter.StartCombat();
            }
            else if (this.Room.Exit)
            {
                Journal.Instance.Log("You've found the exit to the next floor. Would you like to continue?");
                encounter.StartExit();
            }
        }
Esempio n. 2
0
        public void Investigate()
        {
            /* Method for looking in the room so we can interact with what is there */
            if (Energy > 0)
            {
                this.Room = world.Dungeon[(int)RoomIndex.x, (int)RoomIndex.y];

                /* Each time we investigate we disable all of the controls and enable
                 * The appropriate controls later
                 */
                encounter.ResetDynamicControls();

                //check to see if the room is empty.
                if (this.Room.Empty)
                {
                    //Debug.Log("Room is empty");
                    Journal.Instance.Log("You find yourself in an empty room. What do you do?");
                }
                else if (this.Room.Chest != null)
                {
                    encounter.StartChest();
                    Journal.Instance.Log("You have found a <color=yellow>chest</color>! What would you like to do?");
                }
                else if (this.Room.Enemy != null)
                {
                    Debug.Log("Room is Enemy");
                    //TODO: Add more text options
                    Journal.Instance.Log("You are jumped by a <color=orange>"
                                         + Room.Enemy.Description +
                                         "</color>! You are locked in combat! What would you like to do?");
                    //An enemy is encountered. Therefore we call the encounter method for starting combat
                    encounter.StartCombat();
                }
                else if (this.Room.Exit)
                {
                    Debug.Log("Room is Exit");
                    encounter.StartExit();
                    Journal.Instance.Log("You have found the exit to the next floor. Would you like to continue?");
                }
                else
                {
                    Debug.Log("Something else is going on");
                }
                /* Reset the movement controls to active after the investigation is complete */
                encounter.enableMovementControls();
            }
            else
            {
                return;
            }
        }