Esempio n. 1
0
        private bool InteractWithFeature()
        {
            //Preferably just ask the dungeon if there is a feature here, rather than having all the logic in dungeon
            Dungeon dungeon = Game.Dungeon;
            Player  player  = dungeon.Player;

            Feature featureAtSpace = dungeon.FeatureAtSpace(player.LocationLevel, player.LocationMap);

            if (featureAtSpace == null)
            {
                Game.MessageQueue.AddMessage("Nothing to interact with here");
                return(false);
            }

            //Interact with feature - these will normally put success / failure messages in queue
            return(featureAtSpace.PlayerInteraction(player));
        }