Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To load sounds, we will create a method in the game class called LoadSounds. There, we will load sounds for an explosion, a hit sound, and a select sound:
LoadSounds.Method LoadSounds:Int ()
select, explosion, and hit (remember, no file extension!).sndSelect = eng.LoadSound("select")
sndExplo = eng.LoadSound("explosion")
sndHit = eng.LoadSound("hit")
Return 0 End