Package com.dragonboat.game
Class Goose
- java.lang.Object
-
- com.dragonboat.game.Obstacle
-
- com.dragonboat.game.Goose
-
public class Goose extends Obstacle
Represents a goose obstacle on the course.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeDirection()
Changes the direction of the Goose to an appropriate, random cardinal direction.void
Move(float moveVal, int backgroundOffset)
Moves the goose.
-
-
-
Field Detail
-
direction
public java.lang.String direction
-
givenLane
public Lane givenLane
-
-
Constructor Detail
-
Goose
public Goose(int xPosition, int yPosition, com.badlogic.gdx.graphics.Texture texture, Lane lane)
Creates a goose instance.
Geese can face North, East, South or West. Width and height switch when changing between North or South and East or West.
- Parameters:
xPosition
- X-position.yPosition
- Y-position.texture
- Texture asset for the goose.lane
- Lane the goose will spawn in.
-
-