Question Threading Console.Beeps Pausing/Resuming

Aswarin

New member
Joined
Dec 5, 2013
Messages
1
Programming Experience
3-5
I have got a day night cycle completely working in a text adventure I'm programming however I want different music to play using console.beep at different times while you are playing the game.
Is there anyway to Pause a thread then resume it? Whenever I use "threadname.suspend()" it says it is deprecated.

an example would be,

If night = true then
musicday.suspend()
musicnight.resume()

if night = fale then
musicnight.suspend()
musicday.resume()

Please if you have any experience with solving these problems any assistance would be appreciated.
 
Using a separate thread for each sound track is a poor choice. Just write a method for each sound track and then have the one thread call the appropriate method depending on the "time of day".
 
Back
Top