Game Development Reference
In-Depth Information
tanker = loadImage("_tanker.png")
setupSound()
colors = {
{0, 0, 255}, -- blue
{255, 0, 0}, -- red
{0, 255, 0}, -- green
{255, 0, 255}, -- magenta
{0, 255, 255}, -- cyan
{255, 255, 0}, -- yellow
{255, 255, 255}, -- white
{179, 115, 255}, -- orange
}
createHUDItems()
setVisible(txtGameOver,false)
setVisible(tanker, false)
setVisible(survivor, false)
setVisible(txtTapAgain,false)
15-7 shows the final version of the game.
Figure 15-7. The working Chopper Rescue game, with an added background
Note The preceding code is only an excerpt of the full source code. While it will run and demonstrate
the features described in this chapter, it isn't fully functional. To enjoy the full game, download the
complete source code from the Apress web site and run it.
Search WWH ::




Custom Search