Example #1
0
        public void Update()
        {
            var mouseState = Mouse.GetState();

            if (mouseState.LeftButton != ButtonState.Pressed)
            {
                return;
            }

            var mousePos = mouseState.Position;

            if (mousePos.Y < 47 || mousePos.Y > 47 + 59 * 6)
            {
                _gameStateAgent.Play();
                return;
            }

            foreach (var room in _roommap)
            {
                if (!room.Contains(mousePos))
                {
                    continue;
                }

                var row    = (mouseState.Y - 47) / 59;
                var column = mouseState.X / 85;

                _gameStateAgent.JumpToRoom(row, column);
            }
        }
Example #2
0
 public void Execute()
 {
     _agent.Play();
 }