I know this has been Asked but in my Case i dont know if i Can use the MouseEventArgs since its a Rendering / Input Loop where Im trying to use it Here is the Whole Rendering / Input Loop, I can only Move with the Keyboard which is Rather inconvinient.
public void update()
{
//--do raycast--//
raycast();
//=========================//
//=====take user input=====//
//=========================//
KeyboardState state = Keyboard.GetState();
bool lArrowKeyDown = state.IsKeyDown(Keys.Left) || state.IsKeyDown(Keys.A);
//MouseLeft
if (lArrowKeyDown)
{
rotate(rotSpeed);
}
//MouseRight
bool rArrowKeyDown = state.IsKeyDown(Keys.Right) || state.IsKeyDown(Keys.D);
if (rArrowKeyDown)
{
rotate(-rotSpeed);
}
//MouseUp
bool uArrowKeyDown = state.IsKeyDown(Keys.Up) || state.IsKeyDown(Keys.W);
bool shift = state.IsKeyDown(Keys.LeftShift);
if (uArrowKeyDown)
{
move(moveSpeed);
}
if (uArrowKeyDown && shift)
{
move(moveSpeed+0.01);
}
bool dArrowKeyDown = state.IsKeyDown(Keys.Down) || state.IsKeyDown(Keys.S);
//MouseDown
if (dArrowKeyDown)
{
move(-moveSpeed);
}
//=========================//
//=====user input end======//
//=========================//
}
This is the Whole Rendering / Input Loop, Would it be Possible to add a MouseEventArgs? Im unsure of if a MouseEventArgs Loops too when this Loops. Could someone help me Here?