Skip to content

Commit

Permalink
Increased play area size
Browse files Browse the repository at this point in the history
  • Loading branch information
cham committed Jun 24, 2012
1 parent 99ed750 commit e18e7ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
.hud-active , .hud-saved , .hud-wellcount , .hud-killed , .hud-target, .hud-timeleft, .hud-scroll {
position: absolute;
z-index: 3;
top: 18px;
top: 7px;
}
.hud-scroll {
left: 390px;
Expand All @@ -51,7 +51,7 @@
}
.hud-timeleft {
left: 7px;
top: 30px;
top: 18px;
}
.hud-saved.somesaved {
color: #0f0;
Expand All @@ -65,7 +65,7 @@
position: absolute;
padding-top: 80px;
width: 484px;
height: 204px;
height: 209px;
font-size: 20px;
overflow: hidden;
text-align: center;
Expand Down
5 changes: 2 additions & 3 deletions src/Emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define(['lib/isTouchDevice'],function(isTouchDevice){
drawCount: 0,

cW: 480,
cH: 280,
cH: 285,
ctx: null,
$canvas: null,

Expand Down Expand Up @@ -542,7 +542,6 @@ define(['lib/isTouchDevice'],function(isTouchDevice){

setTimeLimit: function(tl){
this.maxTime = tl || null;
//this.startTime = (new Date()).getTime();
},

onNoActiveParticles: function(cb){
Expand All @@ -566,7 +565,7 @@ define(['lib/isTouchDevice'],function(isTouchDevice){
},

getTimeLeft: function(){
if(!this.maxTime || !this.startTime){
if(!this.maxTime || !this.startTime || !this.emitting){
return -1;
}
return this.maxTime - ((new Date()).getTime() - this.startTime);
Expand Down
7 changes: 4 additions & 3 deletions src/HUD.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ define(['lib/isTouchDevice'],function(isTouchDevice){
this.$log = $('<span class="hud-log"/>');
this.$numtosave = $('<span class="hud-target"/>');
this.$timeleft = $('<span class="hud-timeleft"/>');
this.$scroll = $('<span class="hud-scroll">Scroll back</span>');
//this.$scroll = $('<span class="hud-scroll">Scroll back</span>');

this.$container.append(this.$active,this.$saved,this.$killed,this.$wellcount,this.$log,this.$numtosave,this.$timeleft);

/*
if(isTouchDevice){
this.$container.append(this.$scroll);
}
Expand All @@ -26,7 +26,7 @@ define(['lib/isTouchDevice'],function(isTouchDevice){
bindScroll: function(cb){
this.$scroll.unbind('click').bind('click', function(e){
cb(e);
});
});*/
},

updateActive: function(a){
Expand Down Expand Up @@ -55,6 +55,7 @@ define(['lib/isTouchDevice'],function(isTouchDevice){

updateTimeLeft: function(ms){
if(ms===-1){
this.$timeleft.text('');
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ function(DeltaTimer,Emitter,HUD,Loader){

Emitter.respondToUI(false);

HUD.makeDom();
HUD.makeDom();/*
HUD.bindScroll(function(){
document.body.scrollTop = 100;
});
});*/

DeltaTimer.onTick(function(delta){
Emitter.move();
Expand Down

0 comments on commit e18e7ec

Please sign in to comment.