Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

stay dead

no zombie cats hack
  • Loading branch information...
commit 83a7777749a2cfceccca2e925581a5d698776935 1 parent 66443c7
Florian Schweikert authored December 16, 2012

Showing 1 changed file with 12 additions and 1 deletion. Show diff stats Hide diff stats

  1. 13  game.js
13  game.js
@@ -57,6 +57,14 @@ function init_bandit() {
57 57
                           height: 64
58 58
                       },
59 59
                       frequence: 15
  60
+                  },
  61
+                  dead: {
  62
+                      frames: [4*16+6, 4*16+6],
  63
+                      size: {
  64
+                          width: 64,
  65
+                          height: 64
  66
+                      },
  67
+                      frequence: 1
60 68
                   }
61 69
                   }
62 70
               });
@@ -125,7 +133,9 @@ function init_bandit() {
125 133
       mainScene.health.scaleX=percent;
126 134
       if (percent==0) {
127 135
         mainScene.players[0].animation.stop();
128  
-        mainScene.players[0].animation.play('die', 10);
  136
+        mainScene.players[0].animation.play('die');
  137
+        setTimeout(20);
  138
+        mainScene.players[0].animation.play('dead');
129 139
       }
130 140
     }
131 141
 
@@ -198,6 +208,7 @@ function init_bandit() {
198 208
     function playBackgroundMusic(soundfile) {
199 209
         var audio = document.createElement('audio');
200 210
         audio.setAttribute('controls', 'controls');
  211
+        audio.setAttribute('loop', 'true');
201 212
         audio.src = soundfile;
202 213
         audio.play();
203 214
     }

0 notes on commit 83a7777

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