Esempio n. 1
0
        private void CreateHorizontalTunnel(int xStart, int xEnd, int yPosition, bool entranceDoor)
        {
            var tunel = new Tunel()
            {
                XStart = xStart,
                XEnd   = xEnd,
                YStart = yPosition,
                YEnd   = yPosition
            };

            Door door;

            if (entranceDoor)
            {
                door = new Door()
                {
                    X = xStart,
                    Y = yPosition
                };
            }
            else
            {
                door = new Door()
                {
                    X = xEnd,
                    Y = yPosition
                };
            }

            tunel.Door = door;

            this.mappingService.AddTunelToDungeon(tunel, this.map.Id);
        }
Esempio n. 2
0
        private void CreateVerticalTunnel(int yStart, int yEnd, int xPosition, bool entranceDoor)
        {
            var tunel = new Tunel()
            {
                XStart = xPosition,
                XEnd   = xPosition,
                YStart = yStart,
                YEnd   = yEnd
            };

            Door door;

            if (entranceDoor)
            {
                door = new Door()
                {
                    X = xPosition,
                    Y = yStart
                };
            }
            else
            {
                door = new Door()
                {
                    X = xPosition,
                    Y = yEnd
                };
            }

            tunel.Door = door;

            this.mappingService.AddTunelToDungeon(tunel, this.map.Id);
        }
        public MainWindow()
        {
            instance = this;

            InitializeComponent();
            this.DataContext = status;

            status      = "LOlol";
            shortStatus = "ICOOOOO";
            conf        = ConfigEditor.startConfig();
            rd          = new Tunel(conf.host, conf.user, conf.password, conf.remotePort);
            rd.Start();
            //instance.Hide();
        }
        public void AddTunelToDungeon(Tunel tunel, int dungeonId)
        {
            this.GetDungeonById(dungeonId).Tunels.Add(tunel);

            this.unit.Commit();
        }