var SpriteNumber = function(width,height,u,v,uWidth,vHeight,texture)
{
	this._sprite = new Sprite2D(width,height,u,v,uWidth,vHeight,texture);
	this._width = width;
	this._height = height;
	this._u = u;
	this._v = v;
	this._uWidth = uWidth;
	this._vHeight = vHeight;
	this._pos = new Vector3D(0,0,0);
};

SpriteNumber.prototype =
{
	draw : function(num)
	{
		var str = (num).toString();
		var length = str.length;
		this._sprite._pos.y = this._pos.y;
		for ( var i = 0; i < length; i++ )
		{
			var u = ~~(num/Math.pow(10, i)) % 10;
			this._sprite.initUVs(this._u+this._uWidth*u,this._v,this._uWidth,this._vHeight);
			this._sprite._pos.x = this._pos.x - (i - length + 1) * this._width;
			this._sprite.draw();
		}
	}
};
