Game Development Reference
In-Depth Information
First, let's add an array of cars. The updated scene will look like this:
The MyModelTest.java file is as follows:
public class MyModelTest extends ApplicationAdapter {
...
public Array<ModelInstance> instances = new
Array<ModelInstance>();
@Override
public void create() {
environment = new Environment();
environment.set(new
ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f,
0.4f, 1f));
environment.add(new DirectionalLight().set(0.8f, 0.8f,
0.8f, -1f, -0.8f, -0.2f));
modelBatch = new ModelBatch();
 
Search WWH ::




Custom Search