Ejemplo n.º 1
0
        static void LevelTransitionInteraction(Furnishing furnishing, Actor actor)
        {
            if (actor.HasTrait(Trait.Player))
            {
                var destinationLevel = (Levels.LevelId)Enum.Parse(typeof(Levels.LevelId),
                                                                  furnishing.GetOtherAttributeValue("DestinationLevel"));
                var destinationXLoc = int.Parse(furnishing.GetOtherAttributeValue("DestinationXLoc"));
                var destinationYLoc = int.Parse(furnishing.GetOtherAttributeValue("DestinationYLoc"));

                MainProgram.LevelTransition(destinationLevel, destinationXLoc, destinationYLoc);
            }
        }
Ejemplo n.º 2
0
        static void InteractionTrap1Interaction(Furnishing furnishing, Actor actor)
        {
            var trapLevel = int.Parse(furnishing.GetOtherAttributeValue("TrapLevel"));

            if (actor.HasTrait(Trait.Player))
            {
                MainGraphicDisplay.TextConsole.AddOutputText(string.Format("Trap hits you for {0} damage", trapLevel));
            }
        }