Skip to content

Commit

Permalink
Added camera modes shared, follow A, or follow B. Made fans last longer
Browse files Browse the repository at this point in the history
  • Loading branch information
ekunuke committed Feb 10, 2013
1 parent 48c2259 commit 7a0fc49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/fan.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var FAN_W = 32;
var FAN_H = 32;
var FAN_SPAWN_TIMER = 1;
var FAN_MAX_POWER = 200;
var FAN_POWER_THRESHOLD = 100; //How much power needed to spin
var FAN_POWER_THRESHOLD = 55; //How much power needed to spin
var FAN_GOO_POWER = 50; //How much power one goo gives
var FAN_POWER_UPKEEP = 1; //How much power lost per frame

Expand Down
5 changes: 3 additions & 2 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var CAMERA_SHAKE_FACTOR = 10;
var camera = {
x: 0,
y: 0,
mode: 'shared',
minZoom: 0.5,//calculate this at beginning of each room.
zoom: 1,
shake: 0, //0 is normal, > 0 is a timer for shaking,
Expand Down Expand Up @@ -430,10 +431,10 @@ var step = function() {
doTransition();
break;
}
if(playerA.dead) {
if(playerA.dead || camera.mode == 'B') {
camera.moveTo(playerB.x, playerB.y);
}
else if(playerB.dead) {
else if(playerB.dead || camera.mode == 'A') {
camera.moveTo(playerA.x, playerA.y);
}
else {
Expand Down

0 comments on commit 7a0fc49

Please sign in to comment.