Game Development Reference
In-Depth Information
batch.begin();
sprite.setRotation(45);
sprite.draw(batch);
batch.end();
}
As a result, the following line to your code inside the MyDemo.java source file right
before sprite.draw() is called:
sprite.setRotation(45);
It will make the sprite rotate by 45 degrees in a counter-clockwise direction, as
shown in the following screenshot. The next step is to save your changes to the
source file. What you should see now is that the change you have just made to
the code is immediately reflected in the still running application!
 
Search WWH ::




Custom Search