Game Development Reference
In-Depth Information
}
public float
getBoundRot()
{
return boundRot;
}
public void
setBoundRot(float boundRot)
{
this.boundRot = boundRot;
}
public float
getFriction()
{
return friction;
}
public void
setFriction(float friction)
{
this.friction = friction;
}
public float
getGravity()
{
return gravity;
}
public void
setGravity(float gravity)
{
this.gravity = gravity;
}
public float
getBounce()
{
return bounce;
}
public void
setBounce(float bounce)
{
this.bounce = bounce;
}
It is important to note that objects created using the Hero class also have access to
the getter and setter methods that we generated earlier for the Actor class. In case you
are wondering what the Java keyword
this
means in all of these .set() methods, it is re-
ferring to the current object that has been created using the Actor or Hero class con-
structor method. Thus if you call the .setBounce() method off of the iBagel Bagel ob-