multipliers fade out faster
This commit is contained in:
parent
2e15e31fe7
commit
bc548d3240
2 changed files with 2 additions and 6 deletions
|
@ -28,12 +28,8 @@ function Text(x,y,text,font,color,incrementFunction){
|
|||
}
|
||||
|
||||
function fadeUpAndOut(text){
|
||||
text.opacity -=0.07;
|
||||
text.opacity -= Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/100;
|
||||
text.alive = text.opacity;
|
||||
text.y-=3;
|
||||
}
|
||||
|
||||
function fadeOut(text){
|
||||
text.opacity -= Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/250;
|
||||
text.alive = text.opacity;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ function consolidateBlocks(clock,side,index){
|
|||
clock.comboMultiplier += 1;
|
||||
clock.lastCombo = now;
|
||||
var coords = findCenterOfBlocks(deletedBlocks);
|
||||
clock.texts.push(new Text(coords['x'],coords['y'],"x "+clock.comboMultiplier.toString(),"bold Q 24px","#fff",fadeOut));
|
||||
clock.texts.push(new Text(coords['x'],coords['y'],"x "+clock.comboMultiplier.toString(),"bold Q 24px","#fff",fadeUpAndOut));
|
||||
}
|
||||
else{
|
||||
clock.lastCombo = now;
|
||||
|
|
Loading…
Reference in a new issue