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

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
« no previous file with comments | « nacltoons/src/FrontEnd.cc ('k') | nacltoons/src/GameplayScene.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium 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 { 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 {
13 public: 17 public:
14 Gameplay(); 18 Gameplay() {}
19 ~Gameplay() {}
20 CREATE_FUNC(Gameplay);
21 virtual bool init();
22 void Restart();
23 static CCScene* scene();
24 };
15 25
16 ~Gameplay(); 26 /**
17 27 * UI layer for menus.
28 */
29 class UILayer : public CCLayer {
30 public:
31 UILayer() {}
32 ~UILayer() {}
33 CREATE_FUNC(UILayer);
18 virtual bool init(); 34 virtual bool init();
19 35
20 static CCScene* scene(); 36 private:
21 37 // menu callbacks
22 CREATE_FUNC(Gameplay); 38 void Restart(CCObject* sender);
23 39 void Exit(CCObject* sender);
24 virtual void ccTouchesEnded(CCSet* touches, CCEvent* event);
25 protected:
26 void updateGame(float dt);
27 }; 40 };
28 41
29 #endif // !GAMEPLAY_SCENE_H 42 #endif // !GAMEPLAY_SCENE_H_
OLDNEW
« 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