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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2013 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #ifndef GAMEPLAY_SCENE_H 4 #ifndef GAMEPLAY_SCENE_H
5 #define GAMEPLAY_SCENE_H 5 #define GAMEPLAY_SCENE_H
6 6
7 #include "cocos2d.h" 7 #include "cocos2d.h"
8 8
9 USING_NS_CC; 9 USING_NS_CC;
10 10
11 class Gameplay : public CCLayerColor 11 /**
12 * Main gameplay scene containing the physics layer
13 * that the user can interact with and a UI layer over
14 * the top for menus.
15 */
16 class Gameplay : public CCScene
12 { 17 {
binji 2013/02/12 22:51:53 nit: { on previous line
Sam Clegg 2013/02/12 23:07:38 Done.
13 public: 18 public:
14 Gameplay(); 19 Gameplay() {}
20 ~Gameplay() {}
21 CREATE_FUNC(Gameplay);
22 virtual bool init();
23 void restart();
24 static CCScene* scene();
25 };
15 26
16 ~Gameplay(); 27 /**
17 28 * UI layer for menus.
29 */
30 class UILayer : public CCLayer
31 {
binji 2013/02/12 22:51:53 nit: { on previous line
Sam Clegg 2013/02/12 23:07:38 Done.
32 public:
33 UILayer() {}
34 ~UILayer() {}
35 CREATE_FUNC(UILayer);
18 virtual bool init(); 36 virtual bool init();
19 37
20 static CCScene* scene(); 38 private:
21 39 // menu callbacks
22 CREATE_FUNC(Gameplay); 40 virtual void restart(CCObject* sender);
23 41 virtual void exit(CCObject* sender);
24 virtual void ccTouchesEnded(CCSet* touches, CCEvent* event);
25 protected:
26 void updateGame(float dt);
27 }; 42 };
28 43
29 #endif // !GAMEPLAY_SCENE_H 44 #endif // !GAMEPLAY_SCENE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698