Game Development Reference
In-Depth Information
protected boolean isAlive ;
protected boolean isFixed ;
protected boolean isBonus ;
protected boolean hasValu ;
protected boolean isFlipV ;
protected boolean isFlipH ;
Figure 8-7 . Add the rest of the variables needed to support rotation (pivot point), and sprite definition states
Next, we'll initialize these variables, inside the Actor() constructor method. If you
wanted to pass settings to any of these Boolean flags into the Actor() constructor meth-
od using the parameter list, remember that you're able to create as many overloaded
constructor method formats as you like, as long as the parameter list for each one is
100% unique. We may well do this later on during the topic, if, for instance, we need a
constructor method that pivots our fixed sprites for layout design purposes, for in-
stance, or one that flips it around a given axis, for instance, for the same exact purpose,
or one that does both of these, which would give us a nine parameter Actor() construct-
or method call.
 
Search WWH ::




Custom Search