made text/score effects time based
This commit is contained in:
parent
d6311ceec6
commit
485cfefddc
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ function Text(x,y,text,font,color,incrementFunction){
|
|||
}
|
||||
|
||||
function fadeUpAndOut(text){
|
||||
text.opacity -= Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/100;
|
||||
text.opacity -= MainHex.dt * Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/100;
|
||||
text.alive = text.opacity;
|
||||
text.y-=3;
|
||||
text.y -= 3 * MainHex.dt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue