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 |
| 5 #ifndef GAME_MANAGER_H_ |
| 6 #define GAME_MANAGER_H_ |
| 7 |
| 8 #include "cocos2d.h" |
| 9 |
| 10 /** |
| 11 * Tags used by the GameManager to identify scene elements. Actual values |
| 12 * here are not important as long as they are unique within the scene. |
| 13 */ |
| 14 enum ObjectTags { |
| 15 TAG_LAYER_LEVEL = 100, |
| 16 TAG_LAYER_UI = 101, |
| 17 TAG_LAYER_OVERLAY = 102, |
| 18 }; |
| 19 |
| 20 USING_NS_CC; |
| 21 |
| 22 /** |
| 23 * Game manager is in charge to creating scenes and transitioning |
| 24 * between them. |
| 25 */ |
| 26 class GameManager { |
| 27 public: |
| 28 void Restart(CCScene* scene); |
| 29 void GameOver(CCScene* scene, bool success); |
| 30 void LoadLevel(int level_number); |
| 31 static GameManager* sharedManager(); |
| 32 private: |
| 33 void CreateLevel(CCScene* scene); |
| 34 GameManager() {} |
| 35 int level_number_; |
| 36 }; |
| 37 |
| 38 #endif // GAME_MANAGER_H_ |
OLD | NEW |