Are there any methods in c# that wait a number of seconds?! Im doing a game in XNA and I need to have a delay!
Are there any methods in c# that wait a number of seconds?! Im doing a game in XNA and I need to have a delay!
You can sleep the thread ( Application.Thread.Sleep() I believe, but truth is, you dont want to do this.
Your best bet is to alter your game logic. In XNA on update, you are passed the delta in time since the last update. Simply create a counter variable when you want to paused, increment it every update frame, and basically "Do Nothing" until that value > your needed time threshold. This will effectively pause your game logic, without impacting other subsystems ( like rendering )