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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ChooseBoat(int boatNo)
Assigns the selected boat template to the boat.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, 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 lane, 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.lane
- Lane for the boat.name
- Name of the boat.
-
-