Package com.starpoints.painter.arena2D
Class PainterItemMine
- java.lang.Object
-
- com.starpoints.painter.arena2D.PainterThing
-
- com.starpoints.painter.arena2D.PainterItem
-
- com.starpoints.painter.arena2D.PainterItemMine
-
public class PainterItemMine extends PainterItem
Special painter for ItemMine. Paints a small red dot on active mines.
-
-
Field Summary
-
Fields inherited from class com.starpoints.painter.arena2D.PainterItem
item_xFactor, item_yFactor, startIndexOfAnimation
-
-
Constructor Summary
Constructors Constructor Description PainterItemMine(PainterFactory painterFactory)Creates a PainterItemMine.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFigureOverlayImageName(int animationIndex)Gets an image name for painting on the figure.voidpaint(Graphics g, ThingState t, GameState state, int xCenter, int yCenter, int repaintCounter)Paints a small red dot on active mines.voidpaintItemAsInfo(Graphics g, GameState state, ItemState itemState, int xCenter, int yCenter, double factor)Paints the thing on infopanels on the screen.-
Methods inherited from class com.starpoints.painter.arena2D.PainterItem
drawEnergyFx, getAnimatedXCoordinate, getAnimatedYCoordinate, paintExplosionBlackened, paintExplosionExploding, paintItemOnFigure, paintItemOnFigureOverlay, 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
-
PainterItemMine
public PainterItemMine(PainterFactory painterFactory)
Creates a PainterItemMine.- Parameters:
painterFactory- The factory.
-
-
Method Detail
-
paint
public void paint(Graphics g, ThingState t, GameState state, int xCenter, int yCenter, int repaintCounter)
Paints a small red dot on active mines.- Overrides:
paintin classPainterItem- Parameters:
g- The graphics to paint ont- The thing.state- GameState.xCenter- The x coordinateyCenter- The y coordinaterepaintCounter- The repaint counter.
-
getFigureOverlayImageName
public java.lang.String getFigureOverlayImageName(int animationIndex)
Gets an image name for painting on the figure. Returns null by default for no overlay image.- Parameters:
animationIndex- The animation index.- Returns:
- The overlay image name or null for no overlay.
-
paintItemAsInfo
public void paintItemAsInfo(Graphics g, GameState state, ItemState itemState, int xCenter, int yCenter, double factor)
Paints the thing on infopanels on the screen.- Overrides:
paintItemAsInfoin classPainterItem- Parameters:
g- The graphics to paint on.itemState- The item.xCenter- The x center coordinate.yCenter- The y center coordinate.factor- Scaling factor.
-
-