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

Unified Diff: nacltoons/src/game_manager.h

Issue 12579005: [nacltoons] Rename core classes in accordance with doc. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « nacltoons/src/frontend.cc ('k') | nacltoons/src/game_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nacltoons/src/game_manager.h
diff --git a/nacltoons/src/game_manager.h b/nacltoons/src/game_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b37c671c6a1f0fa23e4f296b3e80a9cf18d59f8
--- /dev/null
+++ b/nacltoons/src/game_manager.h
@@ -0,0 +1,38 @@
+// 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 GAME_MANAGER_H_
+#define GAME_MANAGER_H_
+
+#include "cocos2d.h"
+
+/**
+ * Tags used by the GameManager to identify scene elements. Actual values
+ * here are not important as long as they are unique within the scene.
+ */
+enum ObjectTags {
+ TAG_LAYER_LEVEL = 100,
+ TAG_LAYER_UI = 101,
+ TAG_LAYER_OVERLAY = 102,
+};
+
+USING_NS_CC;
+
+/**
+ * Game manager is in charge to creating scenes and transitioning
+ * between them.
+ */
+class GameManager {
+ public:
+ void Restart(CCScene* scene);
+ void GameOver(CCScene* scene, bool success);
+ void LoadLevel(int level_number);
+ static GameManager* sharedManager();
+ private:
+ void CreateLevel(CCScene* scene);
+ GameManager() {}
+ int level_number_;
+};
+
+#endif // GAME_MANAGER_H_
« no previous file with comments | « nacltoons/src/frontend.cc ('k') | nacltoons/src/game_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698