From 4e4690efbb85de847e8e52220d0cb8ccd2d24ca1 Mon Sep 17 00:00:00 2001 From: TehBucket Date: Wed, 20 Aug 2014 19:13:20 -0400 Subject: [PATCH] blue slows enemies --- stuff.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stuff.js b/stuff.js index 3378714..436d529 100644 --- a/stuff.js +++ b/stuff.js @@ -20,6 +20,7 @@ Colorblind players?? Difficulty: progress bar new enemy: doesn't move much, shoots projectiles at player IMPROVE new level generation system + Boss levels BUGS: */ @@ -208,7 +209,9 @@ var background = function(){ 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) + // 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 blue'); } @@ -277,7 +280,7 @@ var explode = function(a){with(a){ //creates particles from given object var enMove = function(){ for(var i=0;i= 100 ? tim = 0 : tim+=1; + c == co.en || tim >= 100 ? tim = 0 : tim+=1; if(tim<50 && c!=co.en && hp>0){c=co.en} //flashes back to white except when dead var a = fromAngle(r) //x,y coords of direction enemy is facing //turn towards player