Skip to content

Commit

Permalink
removed yellow
Browse files Browse the repository at this point in the history
  • Loading branch information
TehBucket committed Sep 11, 2014
1 parent 4e4690e commit e6ebbb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions stuff.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ var background = function(){
console.log('hit enemy with red');
}
else if(c.g>=255 && c.r <255 && c.b <255 && en[i3].tim==0){//if GREEN
if(en[i3].fric>0){en[i3].fric -= .01;} //slows enemy (friction)
console.log('hit enemy with green');
}
else if(c.b>=255 && c.g <255 && c.r <255 && en[i3].tim==0){//if BLUE
// if(en[i3].acc>0){en[i3].acc -=.05;} //slows enemy (acceleration)
en[i3].xv /=3 //slows enemy (current velocity)
en[i3].yv /=3 //slows enemy (current velocity)
console.log('hit enemy with green');
}
else if(c.b>=255 && c.g <255 && c.r <255 && en[i3].tim==0){//if BLUE
if(en[i3].fric>0){en[i3].fric -= .01;} //slows enemy (friction)
console.log('hit enemy with blue');
}

Expand Down Expand Up @@ -428,8 +428,8 @@ document.addEventListener('keydown', function(e){
//keys 1-4 change which element/colour (p.el) player trails
if(e.keyCode==49){p.el=co.r3;p.c=mix(co.r3,co.w,-.5)} //red, fire, 1
if(e.keyCode==50){p.el=co.b3;p.c=mix(co.b3,co.w,-.5)} //blue, water 2
if(e.keyCode==51){p.el=co.y3;p.c=mix(co.y3,co.w,-.5)} //yellow, earth 3
if(e.keyCode==52){p.el=co.g3;p.c=mix(co.g3,co.w,-.5)} //green, air 4
// if(e.keyCode==51){p.el=co.y3;p.c=mix(co.y3,co.w,-.5)} //yellow, earth 3
if(e.keyCode==51){p.el=co.g3;p.c=mix(co.g3,co.w,-.5)} //green, air 4
if(e.keyCode==32){lvl.pause ? frame=self.setInterval(update,1) : clearInterval(frame)} //pauses game

},false);
Expand Down

0 comments on commit e6ebbb1

Please sign in to comment.