Skip to content
Browse files

up and down animation

  • Loading branch information...
1 parent 65bab90 commit 9c602a9508a15b696b6cb7dc58ff10b37585ce92 @luizgustavolino luizgustavolino committed Nov 21, 2012
Showing with 348 additions and 113 deletions.
  1. +1 −1 Classes/AppDelegate.js
  2. +88 −18 Classes/Capn.js
  3. +10 −6 Classes/GameScene.js
  4. +8 −7 Classes/PirateMutiny.js
  5. +10 −3 Classes/SpriteUtils.js
  6. +11 −13 Classes/World.js
  7. +218 −64 Resources/pm.plist
  8. BIN Resources/pm.png
  9. +2 −1 cocos2d.js
View
2 Classes/AppDelegate.js
@@ -12,7 +12,7 @@ cc.AppDelegate = cc.Application.extend({
applicationDidFinishLaunching:function () {
var director = cc.Director.sharedDirector();
- director.setDisplayFPS(false);
+ director.setDisplayFPS(true);
director.setAnimationInterval(1.0/32.0);
var spriteCache = cc.SpriteFrameCache.sharedSpriteFrameCache();
View
106 Classes/Capn.js
@@ -1,32 +1,102 @@
var Capn = cc.Sprite.extend({
+ state: PM.PLAYER_STATE.UNKNOWN,
+
+
init: function(){
this._super();
- // IDLE ANIMATION
- var animFrames = [];
- var str = "";
- for (var i = 1; i < 5; i++) {
- str = "capn_idle" + (i < 10 ? ("0" + i) : i) + ".png";
- var frame = cc.SpriteFrameCache.sharedSpriteFrameCache().spriteFrameByName(str);
- animFrames.push(frame);
- }
- var animation = cc.Animation.create(animFrames, 0.15);
- cc.AnimationCache.sharedAnimationCache().addAnimation(animation, "capnIdle");
-
- // RUN ANIMATION
- var animCache = cc.AnimationCache.sharedAnimationCache();
- var idle_anm = animCache.animationByName("capnIdle");
- var animN = cc.Animate.create(idle_anm);
- var repeat = cc.RepeatForever.create(animN);
- this.runAction(repeat);
-
+ // ANIMATIONS
+ addFBFSpriteAnimationToCache("capn_idle",4,.15,"capnIdle");
+ addFBFSpriteAnimationToCache("capn_down",3,.15,"capnDown");
+ addFBFSpriteAnimationToCache("capn_jump",4,.15,"capnJump");
+
this.scheduleUpdate();
+ this.wait();
},
update:function(dt){
+ },
+
+ walkLeft: function(){
+
+ if(this.state == PM.PLAYER_STATE.JUMP) return;
+
+ if(this.state != PM.PLAYER_STATE.WALK_LEFT){
+ this.state = PM.PLAYER_STATE.WALK_LEFT;
+ this.stopAllActions();
+ }
+ var p = this._position;
+ this.setPosition(cc.ccp(p.x-1, p.y));
+
+ },
+
+ walkRight: function(){
+
+ if(this.state == PM.PLAYER_STATE.JUMP) return;
+
+ if(this.state != PM.PLAYER_STATE.WALK_RIGHT){
+ this.state = PM.PLAYER_STATE.WALK_RIGHT;
+ this.stopAllActions();
+ }
+ var p = this._position;
+ this.setPosition(cc.ccp(p.x+1, p.y));
+ },
+
+ jump: function(){
+ if(this.state != PM.PLAYER_STATE.JUMP){
+ this.state = PM.PLAYER_STATE.JUMP;
+ this.stopAllActions();
+
+ var animCache = cc.AnimationCache.sharedAnimationCache();
+ var animN = cc.Animate.create(animCache.animationByName("capnJump"));
+
+ var jump = cc.JumpBy.create(0.6, cc.ccp(0,0), 80, 1);
+
+ var action = cc.CallFunc.create(this, function(){
+ this.state = PM.PLAYER_STATE.UNKNOWN;
+ this.wait();
+ });
+
+ var spawn = cc.Spawn.create(jump,animN);
+ var sequence = cc.Sequence.create(spawn,action);
+ this.runAction(sequence);
+
+ }
+ },
+
+ crouch: function(){
+
+ if(this.state == PM.PLAYER_STATE.JUMP) return;
+
+ if(this.state != PM.PLAYER_STATE.CROUCH){
+ this.state = PM.PLAYER_STATE.CROUCH;
+ this.stopAllActions();
+
+ var animCache = cc.AnimationCache.sharedAnimationCache();
+ var animN = cc.Animate.create(animCache.animationByName("capnDown"));
+ this.runAction(animN);
+
+ }
+ },
+
+ wait: function(){
+
+ if(this.state == PM.PLAYER_STATE.JUMP) return;
+
+ if(this.state != PM.PLAYER_STATE.WAITING){
+
+ this.state = PM.PLAYER_STATE.WAITING
+ this.stopAllActions();
+
+ var animCache = cc.AnimationCache.sharedAnimationCache();
+ var idle_anm = animCache.animationByName("capnIdle");
+ var animN = cc.Animate.create(idle_anm);
+ var repeat = cc.RepeatForever.create(animN);
+ this.runAction(repeat);
+ }
}
});
View
16 Classes/GameScene.js
@@ -19,7 +19,7 @@ var GameScene = cc.Layer.extend({
this.clouds = new Clouds();
this.clouds.setAnchorPoint(cc.ccp(0, 1));
- this.clouds.setPosition(cc.ccp(0, size.height+16));
+ this.clouds.setPosition(cc.ccp(0, size.height-10));
this.addChild(this.clouds);
this.wavesBG = new WaterBG();
@@ -48,14 +48,18 @@ var GameScene = cc.Layer.extend({
update:function(dt){
-
- if(dpad.keys.left.state == dpad.stateKeyPressed){
- this.boat.capn.setPosition(cc.ccp(this.boat.capn._position.x-1,this.boat.capn._position.y));
+ if(dpad.keys.up.state == dpad.stateKeyDown){
+ this.boat.capn.jump();
+ }else if(dpad.keys.down.state == dpad.stateKeyPressed){
+ this.boat.capn.crouch();
+ }else if(dpad.keys.left.state == dpad.stateKeyPressed){
+ this.boat.capn.walkLeft();
}else if(dpad.keys.right.state == dpad.stateKeyPressed){
- this.boat.capn.setPosition(cc.ccp(this.boat.capn._position.x+1,this.boat.capn._position.y));
+ this.boat.capn.walkRight();
+ }else{
+ this.boat.capn.wait();
}
-
dpad.update();
}
View
15 Classes/PirateMutiny.js
@@ -2,13 +2,14 @@
var PM = PM || {};
PM.PLAYER_STATE = {
- WAITING:0,
- WALK_LEFT:1,
- WALK_RIGHT:2,
- JUMP:3,
- LOWER:4,
- HIT:5,
- DEAD:6
+ UNKNOWN: 0,
+ WAITING: 1,
+ WALK_LEFT: 2,
+ WALK_RIGHT: 3,
+ JUMP: 4,
+ CROUCH: 5,
+ HIT: 6,
+ DEAD: 7
}
PM.GAME_SCENE = {
View
13 Classes/SpriteUtils.js
@@ -19,8 +19,9 @@ var RepeatXSprite = cc.Node.extend({
});
-var setupSpriteAnimationWithCustomDelay = function(imageName, frames, perFrameDelay){
-
+
+var addFBFSpriteAnimationToCache = function (imageName, frames, perFrameDelay, finalName){
+
var animFrames = [];
var str = "";
for (var i = 1; i <= frames; i++) {
@@ -30,7 +31,13 @@ var setupSpriteAnimationWithCustomDelay = function(imageName, frames, perFrameDe
}
var animation = cc.Animation.create(animFrames, perFrameDelay);
- cc.AnimationCache.sharedAnimationCache().addAnimation(animation, imageName);
+ cc.AnimationCache.sharedAnimationCache().addAnimation(animation, finalName);
+
+}
+
+var setupSpriteAnimationWithCustomDelay = function(imageName, frames, perFrameDelay){
+
+ addFBFSpriteAnimationToCache(imageName,frames,perFrameDelay,imageName);
// RUN ANIMATION
var animCache = cc.AnimationCache.sharedAnimationCache();
View
24 Classes/World.js
@@ -4,15 +4,13 @@ var Clouds = function(){
var size = cc.Director.sharedDirector().getWinSize();
var node = new cc.Node();
var tileSizeW = 80;
- var tileSizeH = 60;
- var cloudsPattern = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0],
- [0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0],
- [0,0,0,3,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,2,0,0],
- [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0],
- [2,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,3,1,0,0,0,0,0,0,0,0,0,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,3,2,0,0,0,0,0,0,0],
- [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1],
- [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
- [3,2,3,0,0,0,0,3,2,2,3,0,0,0,0,3,2,2,0,3,2,0,0,0,0,2,0,0,2,3,2,0,0,3,2,0,3,0,2,2,3,0,0,0,3,0,2,0,2,2,0,3,0,0,2,3,3,2,0,2,3,2,3,0,3,0,2,3,3,0,0,0,0,2,0,0,3,0,0,2,0,0,0,0,0]];
+ var tileSizeH = 75;
+ var cloudsPattern = [[1,0,0,0,2,3,3,0,0,0,0,0,0,0,2,3,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0],
+ [0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,3,2,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0],
+ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0],
+ [2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,2,0,0,0,0,0,0,0],
+ [0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0],
+ [3,2,3,0,0,0,0,3,2,2,3,0,0,0,0,3,2,0,0,2,3,3,0,0,2,0,0,3,0,0,2,0,0,2,0,1]];
var maxi = cloudsPattern.length;
var maxj = cloudsPattern[0].length;
@@ -39,13 +37,13 @@ var Clouds = function(){
cloudNode.setContentSize(cc.SizeMake(maxj*tileSizeW, tileSizeH));
cloudNode.setPosition(cc.ccp(0,maxi*tileSizeH-i*tileSizeH));
cloudNode.setAnchorPoint(cc.ccp(0, 0));
-
+ cloudNode.setScale(1-(i*.08));
var moveAction = cc.RepeatForever.create(
cc.Sequence.create(
- cc.MoveBy.create(maxj*(1.2*(i+1)), cc.ccp((maxj*tileSizeW+size.width)*-1, 0)),
- cc.CallFunc.create(this, function(){
- cloudNode.setPosition(cc.ccp(size.width,cloudNode._position.y));
+ cc.MoveBy.create(maxj*(2.0*(i+1)), cc.ccp((maxj*tileSizeW+size.width)*-1, 0)),
+ cc.CallFunc.create(cloudNode, function(){
+ this.setPosition(cc.ccp(size.width,this._position.y));
})
)
);
View
282 Resources/pm.plist
@@ -14,15 +14,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {16, 450}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{16, 450}</string>
<key>spriteSourceSize</key>
<string>{16, 450}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{54, 380}, {16, 450}}</string>
+ <string>{{230, 16}, {16, 450}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -36,15 +36,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {52, 68}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{952, 80}, {52, 68}}</string>
+ <string>{{248, 372}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -58,15 +58,15 @@
<key>spriteColorRect</key>
<string>{{0, 2}, {52, 66}}</string>
<key>spriteOffset</key>
- <string>{0, -1}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{52, 66}</string>
+ <string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{0, 380}, {52, 66}}</string>
+ <string>{{316, 388}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -80,15 +80,15 @@
<key>spriteColorRect</key>
<string>{{0, 4}, {52, 64}}</string>
<key>spriteOffset</key>
- <string>{0, -2}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{52, 64}</string>
+ <string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{704, 212}, {52, 64}}</string>
+ <string>{{460, 16}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -102,15 +102,15 @@
<key>spriteColorRect</key>
<string>{{0, 6}, {52, 62}}</string>
<key>spriteOffset</key>
- <string>{0, -3}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{52, 62}</string>
+ <string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{952, 250}, {52, 62}}</string>
+ <string>{{380, 262}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -124,15 +124,15 @@
<key>spriteColorRect</key>
<string>{{0, 4}, {52, 64}}</string>
<key>spriteOffset</key>
- <string>{0, -2}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{52, 64}</string>
+ <string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{952, 184}, {52, 64}}</string>
+ <string>{{438, 114}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -146,15 +146,15 @@
<key>spriteColorRect</key>
<string>{{0, 2}, {52, 66}}</string>
<key>spriteOffset</key>
- <string>{0, -1}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{52, 66}</string>
+ <string>{52, 68}</string>
<key>spriteSourceSize</key>
<string>{52, 68}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{704, 144}, {52, 66}}</string>
+ <string>{{370, 388}, {52, 68}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -168,15 +168,81 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {104, 332}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{104, 332}</string>
<key>spriteSourceSize</key>
<string>{104, 332}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
+ <key>textureRect</key>
+ <string>{{124, 16}, {104, 332}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_down01.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 0}, {66, 70}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{84, 70}</string>
+ <key>spriteSourceSize</key>
+ <string>{84, 70}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{248, 16}, {84, 70}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_down02.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 10}, {66, 60}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{84, 70}</string>
+ <key>spriteSourceSize</key>
+ <string>{84, 70}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{230, 468}, {84, 70}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_down03.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 12}, {66, 58}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{84, 70}</string>
+ <key>spriteSourceSize</key>
+ <string>{84, 70}</string>
+ <key>spriteTrimmed</key>
+ <false/>
<key>textureRect</key>
- <string>{{598, 46}, {104, 332}}</string>
+ <string>{{248, 88}, {84, 70}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -198,7 +264,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{828, 46}, {60, 96}}</string>
+ <string>{{168, 452}, {60, 96}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -220,7 +286,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{704, 46}, {60, 96}}</string>
+ <string>{{398, 16}, {60, 96}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -242,7 +308,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{890, 46}, {60, 96}}</string>
+ <string>{{376, 130}, {60, 96}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -264,7 +330,95 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{766, 46}, {60, 96}}</string>
+ <string>{{248, 274}, {60, 96}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_jump01.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 6}, {60, 106}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{62, 112}</string>
+ <key>spriteSourceSize</key>
+ <string>{62, 112}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{312, 160}, {62, 112}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_jump02.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 2}, {60, 96}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{62, 112}</string>
+ <key>spriteSourceSize</key>
+ <string>{62, 112}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{334, 16}, {62, 112}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_jump03.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 0}, {60, 92}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{62, 112}</string>
+ <key>spriteSourceSize</key>
+ <string>{62, 112}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{248, 160}, {62, 112}}</string>
+ <key>textureRotated</key>
+ <false/>
+ </dict>
+
+ <key>capn_jump04.png</key>
+ <dict>
+ <key>aliases</key>
+ <array>
+
+ </array>
+ <key>spriteColorRect</key>
+ <string>{{0, 0}, {60, 90}}</string>
+ <key>spriteOffset</key>
+ <string>{0, 0}</string>
+ <key>spriteSize</key>
+ <string>{62, 112}</string>
+ <key>spriteSourceSize</key>
+ <string>{62, 112}</string>
+ <key>spriteTrimmed</key>
+ <false/>
+ <key>textureRect</key>
+ <string>{{316, 274}, {62, 112}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -278,15 +432,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {166, 44}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{166, 44}</string>
<key>spriteSourceSize</key>
<string>{166, 44}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{780, 0}, {166, 44}}</string>
+ <string>{{0, 452}, {166, 44}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -300,15 +454,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {192, 42}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{192, 42}</string>
<key>spriteSourceSize</key>
<string>{192, 42}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{586, 0}, {192, 42}}</string>
+ <string>{{0, 408}, {192, 42}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -322,15 +476,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {132, 40}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{132, 40}</string>
<key>spriteSourceSize</key>
<string>{132, 40}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{0, 46}, {132, 40}}</string>
+ <string>{{0, 498}, {132, 40}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -344,13 +498,13 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {584, 14}}</string>
<key>spriteOffset</key>
- <string>{0, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
<string>{584, 14}</string>
<key>spriteSourceSize</key>
<string>{584, 14}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
<string>{{0, 0}, {584, 14}}</string>
<key>textureRotated</key>
@@ -366,15 +520,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {122, 188}}</string>
<key>spriteOffset</key>
- <string>{0, 3}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{122, 188}</string>
+ <string>{122, 194}</string>
<key>spriteSourceSize</key>
<string>{122, 194}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{134, 46}, {122, 188}}</string>
+ <string>{{586, 0}, {122, 194}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -388,15 +542,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {114, 188}}</string>
<key>spriteOffset</key>
- <string>{-4, 3}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{114, 188}</string>
+ <string>{122, 194}</string>
<key>spriteSourceSize</key>
<string>{122, 194}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{258, 46}, {114, 188}}</string>
+ <string>{{0, 212}, {122, 194}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -410,15 +564,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {110, 194}}</string>
<key>spriteOffset</key>
- <string>{-6, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{110, 194}</string>
+ <string>{122, 194}</string>
<key>spriteSourceSize</key>
<string>{122, 194}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{374, 46}, {110, 194}}</string>
+ <string>{{0, 16}, {122, 194}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -432,15 +586,15 @@
<key>spriteColorRect</key>
<string>{{0, 0}, {110, 194}}</string>
<key>spriteOffset</key>
- <string>{-6, -0}</string>
+ <string>{0, 0}</string>
<key>spriteSize</key>
- <string>{110, 194}</string>
+ <string>{122, 194}</string>
<key>spriteSourceSize</key>
<string>{122, 194}</string>
<key>spriteTrimmed</key>
- <true/>
+ <false/>
<key>textureRect</key>
- <string>{{486, 46}, {110, 194}}</string>
+ <string>{{0, 540}, {122, 194}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -462,7 +616,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{952, 46}, {52, 32}}</string>
+ <string>{{124, 350}, {52, 32}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -484,7 +638,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{952, 150}, {52, 32}}</string>
+ <string>{{376, 228}, {52, 32}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -506,7 +660,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{952, 314}, {52, 32}}</string>
+ <string>{{438, 184}, {52, 32}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -528,7 +682,7 @@
<key>spriteTrimmed</key>
<false/>
<key>textureRect</key>
- <string>{{948, 0}, {52, 32}}</string>
+ <string>{{430, 228}, {52, 32}}</string>
<key>textureRotated</key>
<false/>
</dict>
View
BIN Resources/pm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 cocos2d.js
@@ -48,10 +48,11 @@ cc.loadjs = function (filename) {
};
cc.loadjs('Lib/Cocos2d-html5-canvasmenu-min.js');
+cc.loadjs('Classes/PirateMutiny.js');
cc.loadjs('Classes/AppDelegate.js');
cc.loadjs('Classes/dpad.js');
cc.loadjs('Classes/GameScene.js');
cc.loadjs('Classes/Capn.js');
cc.loadjs('Classes/World.js');
cc.loadjs('Classes/SpriteUtils.js');
-cc.loadjs('Classes/PirateMutiny.js');
+

0 comments on commit 9c602a9

Please sign in to comment.
Something went wrong with that request. Please try again.