Package com.starpoints.painter.arena2D
Class PainterItemDriller
- java.lang.Object
-
- com.starpoints.painter.arena2D.PainterThing
-
- com.starpoints.painter.arena2D.PainterItem
-
- com.starpoints.painter.arena2D.PainterItemDriller
-
public class PainterItemDriller extends PainterItem
Painter for SwampGhost.
-
-
Field Summary
-
Fields inherited from class com.starpoints.painter.arena2D.PainterItem
item_xFactor, item_yFactor, startIndexOfAnimation
-
-
Constructor Summary
Constructors Constructor Description PainterItemDriller(PainterFactory painterFactory)Creates a PainterLaserTower.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intanimationIndex(GameState state, int repaintCounter)Calculates the animation index based on rocket speed and frame rate.voidpaintDrilling(Graphics g, ThingState t, GameState state, int xCenter, int yCenter, int repaintCounter)Paint the aim effect.voidpaintItemOnFigureOverlay(Graphics g, FigureState f, ItemState item, GameState state, int xCenter, int yCenter, int repaintCounter)Paints on overlay for the item while on the figure.protected doublestraightMoveFactor(int source, int target)Calculates the movement per animation cycle.-
Methods inherited from class com.starpoints.painter.arena2D.PainterItem
drawEnergyFx, getAnimatedXCoordinate, getAnimatedYCoordinate, paint, paintExplosionBlackened, paintExplosionExploding, paintItemAsInfo, paintItemOnFigure, paintOverlay, performExploding, performStunEffect
-
Methods inherited from class com.starpoints.painter.arena2D.PainterThing
calculateAngle, checkForLevelChange, drawShaded, drawStringCentered, Figure_drawText, getController, getSplitIndex, getXCoordinate, getYCoordinate, initializeForNewLevel, modifyHoverXCoordinate, modifyHoverYCoordinate, paintOval
-
-
-
-
Constructor Detail
-
PainterItemDriller
public PainterItemDriller(PainterFactory painterFactory)
Creates a PainterLaserTower.- Parameters:
painterFactory- The Painter factory.
-
-
Method Detail
-
paintDrilling
public void paintDrilling(Graphics g, ThingState t, GameState state, int xCenter, int yCenter, int repaintCounter)
Paint the aim effect.- Parameters:
g- The graphics to paint ont- The driller.xCenter- The xcenter coordinate on the screenyCenter- The ycenter coordinate on the screenrepaintCounter- The repaintCounter.
-
paintItemOnFigureOverlay
public void paintItemOnFigureOverlay(Graphics g, FigureState f, ItemState item, GameState state, int xCenter, int yCenter, int repaintCounter)
Paints on overlay for the item while on the figure. Called, even if figure is invisible.- Overrides:
paintItemOnFigureOverlayin classPainterItem- Parameters:
g- The graphics.f- The figure.item- The item.xCenter- x Ccenter coordinate.yCenter- y Ccenter coordinate.repaintCounter- repaintCounter.
-
straightMoveFactor
protected double straightMoveFactor(int source, int target)Calculates the movement per animation cycle.- Parameters:
source- Source coordinate.target- Target coordinate.- Returns:
-
animationIndex
protected int animationIndex(GameState state, int repaintCounter)
Calculates the animation index based on rocket speed and frame rate.- Parameters:
state-- Returns:
-
-