The first thing we need to do is to have an actual image. We'll use the back of a tile from our Concentration game in this example, you can get it from the book's website, along with the full source code for this example.
To begin with, we need a layer. A layer groups together one or more Props and serves as a way to control rendering priorities between different Prop sets. For example, you can have one layer for the background and another one on top of it for the objects, and when you add a new Prop on the background layer, it will be displayed below the Props on the objects layer.
MOAILayer inherits from
MOAIProp, so you can think of it as a Prop that groups other Props. You can call any of the methods of
MOAIProp on a layer. ...