public class Water
extends java.lang.Object
Constructor and Description |
---|
Water(float x,
float y,
float direction)
This constructor initializes a new instance of Water at the specified
location and facing a specific movement direction.
|
Modifier and Type | Method and Description |
---|---|
Graphic |
getGraphic()
This is a simple accessor for this object's Graphic, which may be used
by other objects to check for collisions.
|
Water |
update(int time)
This method is called repeatedly by the Game to draw and move the
current Water.
|
public Water(float x, float y, float direction)
x
- the x-coordinate of this new Water's positiony
- the y-coordinate of this new Water's positiondirection
- the angle (in radians) from 0 to 2pi that this
new Water should be both oriented and moving according to.public Water update(int time)
time
- is the amount of time in milliseconds that has elapsed since
the last time this update was called.public Graphic getGraphic()