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

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
« no previous file with comments | « nacltoons/src/FrontEnd.cc ('k') | nacltoons/src/GameplayScene.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nacltoons/src/GameplayScene.h
diff --git a/nacltoons/src/GameplayScene.h b/nacltoons/src/GameplayScene.h
index d2928e07044b5756765a9fdd52e00bc5e7d4e71b..aa59eea08483a1ea55315065f81d95a42d4a4a45 100644
--- a/nacltoons/src/GameplayScene.h
+++ b/nacltoons/src/GameplayScene.h
@@ -1,29 +1,42 @@
-// Copyright (c) 2013 The Native Client Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef GAMEPLAY_SCENE_H
-#define GAMEPLAY_SCENE_H
+#ifndef GAMEPLAY_SCENE_H_
+#define GAMEPLAY_SCENE_H_
#include "cocos2d.h"
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 {
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 {
+ public:
+ UILayer() {}
+ ~UILayer() {}
+ CREATE_FUNC(UILayer);
+ virtual bool init();
- virtual void ccTouchesEnded(CCSet* touches, CCEvent* event);
- protected:
- void updateGame(float dt);
+ private:
+ // menu callbacks
+ void Restart(CCObject* sender);
+ void Exit(CCObject* sender);
};
-#endif // !GAMEPLAY_SCENE_H
+#endif // !GAMEPLAY_SCENE_H_
« no previous file with comments | « nacltoons/src/FrontEnd.cc ('k') | nacltoons/src/GameplayScene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698