September 2014
Beginner
266 pages
5h 38m
English
HUD is usually used to display information to the player such as score, health, and points. In our game, we are going to add the score variable we previously created in the HelloWorldScene files and move it to this layer for convenience.
Similar to how we created GameplayLayer, we will create HUDLayer. So, now in your Classes folder in the system, you will have HUDLayer.h and HUDLayer.cpp; add them in the Solution Explorer panel in the Classes tab by clicking on Add existing file.
In the HUDLayer.h file, add the following code:
#ifndef __wp8Game__HUDLayer__ #define __wp8Game__HUDLayer__ #pragma once #include "cocos2d.h" using namespace cocos2d; class HelloWorldScene; class HUDLayer ...
Read now
Unlock full access