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 voidchangeDirection()Changes the direction of the Goose to an appropriate, random cardinal direction.voidMove(float moveVal, int backgroundOffset)Moves the goose.
-
-
-
Field Detail
-
direction
public java.lang.String direction
-
lanes
public Lane[] lanes
-
laneNo
public int laneNo
-
-
Constructor Detail
-
Goose
public Goose(java.util.HashMap<java.lang.String,com.badlogic.gdx.graphics.Texture> textures, int xPosition, int yPosition, Lane[] lanes, int laneNo)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:
textures- Reference to loaded texturesxPosition- X-position.yPosition- Y-position.lanes- Lanes in the map.laneNo- Lane number the goose will spawn in.
-
-