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

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: fix style nits 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..e9a5b3c61d64e707a6154adcaabda8b599aadf15 100644
--- a/nacltoons/src/GameplayScene.h
+++ b/nacltoons/src/GameplayScene.h
@@ -1,4 +1,4 @@
-// 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
@@ -8,22 +8,35 @@
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
+ virtual void restart(CCObject* sender);
binji 2013/02/12 23:13:25 Restart
binji 2013/02/12 23:13:25 Do these need to be virtual?
Sam Clegg 2013/02/12 23:22:36 Done.
Sam Clegg 2013/02/12 23:22:36 Done.
+ virtual void exit(CCObject* sender);
binji 2013/02/12 23:13:25 Exit
Sam Clegg 2013/02/12 23:22:36 Done.
};
#endif // !GAMEPLAY_SCENE_H

Powered by Google App Engine
This is Rietveld 408576698