Esempio n. 1
0
        public void SetCurrentRoom()
        {
            if (MapID.StartsWith("rd"))
            {
                CurrentRoom = GetTargetRoom();

                if (PlayerManager.MyPlayer.CurrentRoom.Width < 3)
                {
                    if (PlayerManager.MyPlayer.CurrentRoom.Height > 2)
                    {
                        CurrentRoom.Y      = Y - 1;
                        CurrentRoom.Height = 2;
                    }
                }
                if (PlayerManager.MyPlayer.CurrentRoom.Height < 3)
                {
                    if (PlayerManager.MyPlayer.CurrentRoom.Width > 2)
                    {
                        CurrentRoom.X     = X - 1;
                        CurrentRoom.Width = 2;
                    }
                }
            }
            else
            {
                if (PlayerManager.MyPlayer.CurrentRoom == null)
                {
                    CurrentRoom = new Maps.DungeonRoom(0, 0, 0, 0);
                }
                CurrentRoom.X      = 0;
                CurrentRoom.Y      = 0;
                CurrentRoom.Width  = Maps.MapHelper.ActiveMap.MaxX;
                CurrentRoom.Height = Maps.MapHelper.ActiveMap.MaxY;
            }
        }
Esempio n. 2
0
        public void SetCurrentRoom()
        {
            if (MapID.StartsWith("rd")) {
                CurrentRoom = GetTargetRoom();

                if (PlayerManager.MyPlayer.CurrentRoom.Width < 3) {
                    if (PlayerManager.MyPlayer.CurrentRoom.Height > 2) {
                        CurrentRoom.Y = Y - 1;
                        CurrentRoom.Height = 2;
                    }
                }
                if (PlayerManager.MyPlayer.CurrentRoom.Height < 3) {
                    if (PlayerManager.MyPlayer.CurrentRoom.Width > 2) {
                        CurrentRoom.X = X - 1;
                        CurrentRoom.Width = 2;
                    }
                }
            } else {
                if (PlayerManager.MyPlayer.CurrentRoom == null) {
                    CurrentRoom = new Maps.DungeonRoom(0, 0, 0, 0);
                }
                CurrentRoom.X = 0;
                CurrentRoom.Y = 0;
                CurrentRoom.Width = Maps.MapHelper.ActiveMap.MaxX;
                CurrentRoom.Height = Maps.MapHelper.ActiveMap.MaxY;
            }
        }