Skip to main content
deleted 81 characters in body
Source Link

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));

Here is how you will initialize Array:

Texture[] tile = {tile1, tile2, tile3};

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));

Here is how you will initialize Array:

Texture[] tile = {tile1, tile2, tile3};

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));

Here is how you will initialize Array:

Texture[] tile = {tile1, tile2, tile3};
added 27 characters in body
Source Link

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));
 
tile[1] =

Here is how you will initialize Array:

Texture[] tile1;
tile[2]tile = tile2;
tile[3]{tile1, =tile2, tile3;tile3};

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));
 
tile[1] = tile1;
tile[2] = tile2;
tile[3] = tile3;

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));

Here is how you will initialize Array:

Texture[] tile = {tile1, tile2, tile3};
Source Link

YOur code should work fine. I don't know why you are getting error. But anyway,

You can initialize tile1, tile2 and tile3 and then you can add them to Array.

tile1 = new Texture(Gdx.files.internal("grass.png"));
tile2 = new Texture(Gdx.files.internal("dirttile.png"));
tile3 = new Texture(Gdx.files.internal("watertile.png"));

tile[1] = tile1;
tile[2] = tile2;
tile[3] = tile3;