Package com.dragonboat.game
Class Player
- java.lang.Object
-
- com.dragonboat.game.Boat
-
- com.dragonboat.game.Player
-
public class Player extends Boat
Represents the player's boat.
-
-
Field Summary
-
Fields inherited from class com.dragonboat.game.Boat
ACCELERATION, bankWidth, currentSpeed, durability, fastestLegTime, finished, frameCounter, height, label, laneNo, lanes, lastFrameY, MANEUVERABILITY, MAX_DURABILITY, MAX_TIREDNESS, MAXSPEED, name, penalties, ROBUSTNESS, texture, textureFrames, threshold, tiredness, width, xPosition, yPosition
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
GetInput()
Moves the player based on key pressed (W, A, S, D).-
Methods inherited from class com.dragonboat.game.Boat
AdvanceTextureFrame, ApplyDamage, applyPenalty, CheckCollisions, CheckIfInLane, ChooseBoat, ChooseBoat, DecreaseSpeed, DecreaseTiredness, finished, GenerateTextureFrames, getAcceleration, getCurrentSpeed, getDurability, getFastestTime, getHeight, getManeuverability, getMaxSpeed, getName, getPenalty, getProgress, getRobustness, getTiredness, getX, getY, IncreaseSpeed, IncreaseTiredness, MoveForward, Reset, ResetFastestLegTime, setFinished, setLane, setStats, setStats, setTexture, setTextureFrames, SteerLeft, SteerRight, UpdateFastestTime
-
-
-
-
Constructor Detail
-
Player
public Player(int yPosition, int width, int height, Lane[] lanes, int laneNo, java.lang.String name)
Creates an instance of the player boat.- Parameters:
yPosition
- Y-position of the boat.width
- Width of the boat.height
- Height of the boat.lanes
- Lanes for the boat.laneNo
- Lane number for the boat.name
- Name of the boat.
-
-