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.
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 OrthographicCamera camera; private SpriteBatch batch; private Texture texture; private Sprite sprite;
Here is a brief explanation of the classes from the preceding code listing to give you a basic background knowledge for the code inspection that...