score multiplier
This commit is contained in:
parent
bca95619b3
commit
7fa3481bb3
3 changed files with 4 additions and 2 deletions
|
@ -172,4 +172,4 @@ function findCenterOfBlocks(arr) {
|
|||
y:trueCanvas.height/2 + Math.sin(avgAngle * (Math.PI / 180)) * avgDFH
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,5 +32,5 @@ function fadeUpAndOut(text){
|
|||
}
|
||||
|
||||
function fadeOut(text){
|
||||
text.opacity -= 0.01 ;
|
||||
text.opacity -= 0.02;
|
||||
}
|
||||
|
|
|
@ -69,6 +69,8 @@ function consolidateBlocks(clock,side,index){
|
|||
if(now - clock.lastCombo < 5000 ){
|
||||
clock.comboMultiplier += 1;
|
||||
clock.lastCombo = now;
|
||||
var coords = findCenterOfBlocks(deletedBlocks);
|
||||
clock.texts.push(new Text(coords['x'],coords['y'],"x "+clock.comboMultiplier.toString(),"bold Lovelo 24px",deletedBlocks[0].color,fadeOut));
|
||||
}
|
||||
else{
|
||||
clock.lastCombo = now;
|
||||
|
|
Loading…
Reference in a new issue