font.scale(5); error

0 Nabeel Afridi · July 10, 2015
//THIS IS MY CODE

package com.nabeel.goodgame;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;


public class MyGdxGame extends ApplicationAdapter {

private SpriteBatch batch;
private BitmapFont font;

@Override
public void create () {

batch= new SpriteBatch();
font = new BitmapFont();
font.setColor(Color.BLUE);
font.scale(5);

}

@Override
public void dispose() {
batch.dispose();
font.dispose();
}

@Override
public void render () {
Gdx.gl.glClearColor(1,1,1,1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

batch.begin();

font.draw(batch, "How r u",100,400);

batch.end();


}
}

//THIS IS THE ERROR I M GETTING

Error:(23, 7) error: cannot find symbol method scale(int)



ALTHOUGH I CHECKED THE CODE FEW TIMES AND IT IS EXACTLY THE SAME AS IN BUCKYS TUTORIAL.

Post a Reply

Replies

Oldest  Newest  Rating
0 Kostas Tsiapalis · August 17, 2015
write font.getData.scale(5); instead  of the old version of code
  • 1

Java / Android Development

107,255 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator