| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 #ifndef GAMEPLAY_SCENE_H_ | |
| 5 #define GAMEPLAY_SCENE_H_ | |
| 6 | |
| 7 #include "cocos2d.h" | |
| 8 | |
| 9 USING_NS_CC; | |
| 10 | |
| 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 GameplayScene : public CCScene { | |
| 17 public: | |
| 18 GameplayScene(int level_number) : level_number_(level_number) {} | |
| 19 ~GameplayScene() {} | |
| 20 static GameplayScene* create(int level_number); | |
| 21 virtual bool init(); | |
| 22 void Restart(); | |
| 23 void GameOver(bool success); | |
| 24 private: | |
| 25 int level_number_; | |
| 26 }; | |
| 27 | |
| 28 /** | |
| 29 * UI layer for displaying menu and information overlays on | |
| 30 * top of the running game. | |
| 31 */ | |
| 32 class UILayer : public CCLayer { | |
| 33 public: | |
| 34 UILayer() {} | |
| 35 ~UILayer() {} | |
| 36 // add static create() method which encapsulates new + init | |
| 37 CREATE_FUNC(UILayer); | |
| 38 virtual bool init(); | |
| 39 | |
| 40 private: | |
| 41 // menu callbacks | |
| 42 void ToggleDebug(CCObject* sender); | |
| 43 void Restart(CCObject* sender); | |
| 44 void Exit(CCObject* sender); | |
| 45 }; | |
| 46 | |
| 47 #endif // GAMEPLAY_SCENE_H_ | |
| OLD | NEW |