Esempio n. 1
0
        private Map CreateMap1()
        {
            Map map = new Map(this, new System.Drawing.RectangleF());

            Door door1 = new Door(new Vector2(0, 50), Direction.Up);
            Door door2 = new Door(new Vector2(0, 200), Direction.Down);

            door1.Destination = door2;
            door2.Destination = door1;

            map.AddEntity(new NPC(new Vector2(50, 0)));

            map.AddEntity(door1);
            map.AddEntity(door2);

            return map;
        }
Esempio n. 2
0
 public static Door LoadDoorFromXml(XmlElement node)
 {
     bool locked = bool.Parse(node.Attributes["locked"].Value);
     string symbol = node.Attributes["symbol"].Value;
     string msg = node.GetElementsByTagName("Message")[0].InnerText;
     Door door = new Door(msg, locked);
     door.SetSymbol(symbol);
     return door;
 }