Jump to content
  • Advertisement
Sign in to follow this  

[.net] [C#] Timer for continuous updating?

This topic is 3877 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm writing an editor of sorts, and I am able to move the view with the mouse. The problem is that I'm not sure how to get it to move continually. Since the view is 2d and will only be made up of geometric shapes and text, there's no need to continually update everything, not will I need to continually draw everything. Rather, only when something changes. But when moving the view around, I have it set so clicking and dragging the mouse will create a vector (direction and length) that the view will move along, as long as the mouse button is held down. But the way the code is now, it only moves the view when the mouse does because I only update the movement in the update function, which is only called when a change is made (which includes the user moving the mouse). Should I create a Timer object and use the 'Tick' event? How else should I get this continuous updating?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!