added custom fonts to Text() object

This commit is contained in:
meadowstream 2014-07-03 19:07:51 -04:00
parent 70f1226c48
commit 03692b426e

View file

@ -7,9 +7,9 @@ function Text(x,y,text,font,color,incrementFunction){
this.text = text;
this.alive=1;
this.draw = function(){
if(this.alive>0){
if (this.alive>0) {
ctx.globalAlpha = this.opacity;
renderText((this.x + gdx), (this.y + gdy),36,this.color,this.text);
renderText((this.x + gdx), (this.y + gdy),36,this.color,this.text,this.font);
ctx.globalAlpha =1;
incrementFunction(this);
return true;