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_ |