void CustomActivity(bool firstTimeCalled) { if (InputManager.Mouse.ButtonPushed(Mouse.MouseButtons.LeftButton)) { if (Cmn.IsMouseInsideWindow()) { if (InputManager.Keyboard.KeyDown(Microsoft.Xna.Framework.Input.Keys.LeftShift) || InputManager.Keyboard.KeyDown(Microsoft.Xna.Framework.Input.Keys.RightShift)) { _SetGoal(InputManager.Mouse.WorldXAt(0), InputManager.Mouse.WorldYAt(0)); } else { _SetStart(ref _GoalPos); _SetGoal(InputManager.Mouse.WorldXAt(0), InputManager.Mouse.WorldYAt(0)); } _FindAndShowPath(); } } }