HTML and CSS Reference
In-Depth Information
If you get a security error in your browser about accessing the
images or the canvas due to cross-domain issues, you may want
to run your code from a server. The following are some software
that you can use to set up a local development server:
F Mac : Anvil/Pow.cx
F Windows : XAMPP
F Linux : Apache/Nginx
Objective complete - mini debriefing
The benefit of having layers is that we don't need to worry about having background stuff
coming in front of the essenial game elements. We divide the game elements into layers.
This is a way to organize and structure the game. They are nothing special but containers.
This helps to create a clear hierarchy for display objects. We add the layers arranged in the
order from background to foreground. The default z index follows the order of addChild .
The child added later is in front of the child added earlier.
We can ensure that things added to the background will always be at the back. Objects
we add in the city layer will never be on top of the user interface. The user interface layer
is always the top layer. The following figure illustrates how three layers separate the display
objects clearly:
 
Search WWH ::




Custom Search