28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8 ■ Creating Your Actor Engine: Design the Characters for Your Game and Define Their Capabilities<br />

These .get() and .set() methods, which are generated by the NetBeans 8.0 Source ➤ Insert Code ➤ Generate<br />

➤ Getters and Setters menu sequence, will give you the following twenty-four <strong>Java</strong> method code constructs, which<br />

equates to two methods for each of the twelve variables that we defined within the public abstract Actor class:<br />

public List getImageStates() {<br />

return imageStates;<br />

}<br />

public void setImageStates(List imageStates) {<br />

this.imageStates = imageStates;<br />

}<br />

public ImageView getSpriteFrame() {<br />

return spriteFrame;<br />

}<br />

public void setSpriteFrame(ImageView spriteFrame) {<br />

this.spriteFrame = spriteFrame;<br />

}<br />

public SVGPath getSpriteBound() {<br />

return spriteBound;<br />

}<br />

public void setSpriteBound(SVGPath spriteBound) {<br />

this.spriteBound = spriteBound;<br />

}<br />

public double getiX() {<br />

return iX;<br />

}<br />

public void setiX(double iX) {<br />

this.iX = iX;<br />

}<br />

public double getiY() {<br />

return iY;<br />

}<br />

public void setiY(double iY) {<br />

this.iY = iY;<br />

}<br />

public double getpX() {<br />

return pX;<br />

}<br />

public void setpX(double pX) {<br />

this.pX = pX;<br />

}<br />

public double getpY() {<br />

return pY;<br />

}<br />

www.it-ebooks.info<br />

175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!