Exemple #1
0
        /// <summary>
        /// Executes the command
        /// </summary>
        public override void Execute()
        {
            User.User oUser = GameManager.instance.GetProperty("current user") as User.User;

            string phrase = oUser.GetProperty("last command string").ToString();

            if (string.IsNullOrEmpty(phrase))
            {
                this.LookArea(oUser.character, oUser.character.location);
                return;
            }

            // if phrase is a valid direction, look at it
            Room r = oUser.character.location as Room;

            if (r.getExit(phrase) != null)
            {
                this.LookDirection(oUser.character, oUser.character.location, phrase);
                return;
            }

            this.LookObject(oUser.character, oUser.character.location, phrase);
        }