The demo application – time for code

In this section we will take a closer look at the actual code of the demo project. Thereafter, we will do some simple modifications to the code and also use the debugger.

Inspecting an example code of the demo application

Let us take a first look at the generated code of MyDemo.java from the demo project.

The following code listing shows the class definition:

public class MyDemo implements ApplicationListener {
  // ...
}

As you can see the MyDemo class implements the ApplicationListener interface. Before we move on to the implementation details of the interface, we will spend some time on the remaining part of this class.

You will find a definition of four member variables, each with a class provided by Libgdx.

private ...

Get Learning Libgdx Game Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.