Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: nacltoons/src/GameplayScene.h

Issue 12226130: [nacltoons] Add initial frontend and physics game scenes. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nacltoons/src/GameplayScene.h
diff --git a/nacltoons/src/GameplayScene.h b/nacltoons/src/GameplayScene.h
index d2928e07044b5756765a9fdd52e00bc5e7d4e71b..a50409eae4e48ef7c1e3b0f4bb94d6249b5d3f19 100644
--- a/nacltoons/src/GameplayScene.h
+++ b/nacltoons/src/GameplayScene.h
@@ -8,22 +8,37 @@
USING_NS_CC;
-class Gameplay : public CCLayerColor
+/**
+ * Main gameplay scene containing the physics layer
+ * that the user can interact with and a UI layer over
+ * the top for menus.
+ */
+class Gameplay : public CCScene
{
binji 2013/02/12 22:51:53 nit: { on previous line
Sam Clegg 2013/02/12 23:07:38 Done.
public:
- Gameplay();
-
- ~Gameplay();
-
+ Gameplay() {}
+ ~Gameplay() {}
+ CREATE_FUNC(Gameplay);
virtual bool init();
-
+ void restart();
static CCScene* scene();
+};
- CREATE_FUNC(Gameplay);
+/**
+ * UI layer for menus.
+ */
+class UILayer : public CCLayer
+{
binji 2013/02/12 22:51:53 nit: { on previous line
Sam Clegg 2013/02/12 23:07:38 Done.
+ public:
+ UILayer() {}
+ ~UILayer() {}
+ CREATE_FUNC(UILayer);
+ virtual bool init();
- virtual void ccTouchesEnded(CCSet* touches, CCEvent* event);
- protected:
- void updateGame(float dt);
+ private:
+ // menu callbacks
+ virtual void restart(CCObject* sender);
+ virtual void exit(CCObject* sender);
};
#endif // !GAMEPLAY_SCENE_H

Powered by Google App Engine
This is Rietveld 408576698