Game Development Reference
In-Depth Information
if(invinciBagel.isDown()) {
spriteFrame. setImage (imageStates. get(6) );
}
Figure 13-11 . Change .isDown() sprite cel to imageStates(6) using the imageStates.get(6) method call to use correct
cel
Let's make sure that the professionalism of our InvinciBagel sprite animation is im-
proving with each section of this chapter, and use the Run Project work process
and test all four arrow keys. Be sure and test the up and down keypresses with the left
and right keypresses (left-up, left-down, right-up, and right-down) to really see what
the Java code that you have put into place so far is capable of. We have a long way to
go, but very impressive results already!
Optimizing Run-Cycle Processing: Turning Off Process-
ing for Fly and Land States
The next thing that I want to do is also advanced conceptually, but uses far less code.
As an optimization nut, what is concerning me is that the animator, framecounter, and
 
Search WWH ::




Custom Search