Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Game name will be 'Pirate mutiny'

  • Loading branch information...
commit b94c2090e7cec6489e191b25e6599b5f3dbb8b6e 1 parent c092817
@luizgustavolino luizgustavolino authored
View
2  Classes/AppDelegate.js
@@ -13,7 +13,7 @@ cc.AppDelegate = cc.Application.extend({
var director = cc.Director.sharedDirector();
director.setDisplayFPS(false);
director.setAnimationInterval(1.0 / 60);
- var scene = PirateRiot.scene();
+ var scene = GameScene.scene();
director.runWithScene(scene);
return true;
},
View
45 Classes/GameScene.js
@@ -0,0 +1,45 @@
+
+var GameScene = cc.Layer.extend({
+
+ helloLabel:null,
+
+
+ init:function () {
+
+ this._super();
+
+ var size = cc.Director.sharedDirector().getWinSize();
+ this.helloLabel = cc.LabelTTF.create("Game layarrr!", "Arial", 28);
+ this.helloLabel.setPosition(cc.ccp(size.width / 2, size.height - 40));
+ this.addChild(this.helloLabel);
+
+ this.schedule(this.update);
+
+ return true;
+
+
+ },
+
+ update:function(dt){
+
+ },
+
+ onKeyDown:function(e){
+ console.log("key event")
+ }
+
+});
+
+GameScene.scene = function () {
+ var scene = cc.Scene.create();
+ var layer = this.node();
+ scene.addChild(layer);
+ return scene;
+};
+
+GameScene.node = function () {
+ var ret = new GameScene();
+ if (ret && ret.init()) return ret;
+ return null;
+};
+
View
2  Classes/PirateMutiny.js
@@ -0,0 +1,2 @@
+
+var PM = PM || {};
View
2  README.md
@@ -1,4 +1,4 @@
-## Pirate Riot
+## Pirate Mutiny
Arrr!
View
5 cocos2d.js
@@ -20,7 +20,7 @@ cc.loadjs = function (filename) {
script.src = cc.Dir + filename;
script.order = cc.loadQue.length;
cc.loadQue.push(script);
-
+
script.onload = function () {
if (this.order + 1 < cc.loadQue.length) {
@@ -49,4 +49,5 @@ cc.loadjs = function (filename) {
cc.loadjs('Lib/Cocos2d-html5-canvasmenu-min.js');
cc.loadjs('Classes/AppDelegate.js');
-cc.loadjs('PirateRiot.js');
+cc.loadjs('Classes/GameScene.js');
+cc.loadjs('Classes/PirateMutiny.js');
View
4 index.html
@@ -3,7 +3,7 @@
<head>
<!--
- Pirate Riot,
+ Pirate Mutiny,
developed by tsubasa soft. on the GithubGameOff, 2012.
Code: @luizGustavoLino
@@ -14,7 +14,7 @@
-->
<meta charset="utf-8">
- <title>Pirate Riot</title>
+ <title>Pirate Mutiny</title>
<link rel="icon" type="image/GIF" href="http://tsubasa.com.br/blog/wp-content/themes/pixelpower/favicon.gif"/>
</head>
<body style="padding:0; margin: 0; background: #333;">
Please sign in to comment.
Something went wrong with that request. Please try again.