I'm still a beginner at programming - I usually fumble my way through coding and debugging. I need some help passing my "Mouse Position" to a class (so the class can determine if the mouse is hovering over the button).
I need help understanding how classes work as well as passing information to them when you use methods.
Basically - what I have now is a class called MouseManager (tracks position and buttons clicked), a class called Buttons (I am trying to get the update method to determine if the mouse is over one of the buttons) and the main program.
Here are some code snippets -
internal void Update(GameTime gameTime, MouseState currentMousePosition)
// Determine if mouse is over the button.
// I need help with MouseState currentMousePosition - I think this is where the problem is...
I can provide all of the code if it would help (well, I added it as .txt files). I am currently getting the following error:
The best overloaded method match for 'MosquitoAttack.Buttons.Update' has some invalid arguments.
Cannot convert from 'MosquitoAttack.MouseManager.State' to 'Microsoft.Xna.Framework.Input.MouseState'