public class LightsTheme extends NewTheme<LightsInstance>
| Modifier and Type | Field and Description |
|---|---|
static int |
LIGHT_HEIGHT |
static int |
LIGHT_WIDTH |
static java.lang.String |
LIGHTS_OUT_THEME |
static java.awt.Color |
MY_COLOR |
| Constructor and Description |
|---|
LightsTheme() |
| Modifier and Type | Method and Description |
|---|---|
void |
drawAnimation(java.awt.Graphics g,
LightsInstance game)
Defines how the Theme subclass should handle animation.
|
void |
drawVertex(java.awt.Graphics2D g,
LightsInstance game,
Vertex v)
Dictates how a vertex should be drawn.
|
int[] |
getAnimationStage(Vertex v,
LightsInstance game)
Return a number or set of numbers that identifies what stage of drawing animation this vertex is at.
|
int |
getBoundingHeight()
Defines the height of the box used to determine the clickable area of a vertex.
|
int |
getBoundingWidth()
Defines the width of the box used to determine the clickable area of a vertex.
|
float |
getBrightnessFactor()
Returns the brightness factor drawing target vertices using the default drawTargetVertex method.
|
int |
getDrawingHeight()
Defines the width of the drawable area of a vertex.
|
int |
getDrawingWidth()
Defines the width of the drawable area of a vertex.
|
java.awt.Color |
getEdgeColor(LightsInstance game,
Vertex a,
Vertex b)
Defines the color used for drawing edges.
|
int |
getNumberAnimatingFrames() |
java.lang.String |
getThemeName() |
java.awt.Point |
getVertexCenter()
Defines the intended center point, relative to the origin (0, 0), on the image created by drawVertex.
|
java.awt.Color |
scaleColor(java.awt.Color original,
int current,
int max) |
void |
setupMoveAnimation(DoubleVertexEvent<?> event)
Assumes the event is a
|
draw, drawBWVertex, drawNormalVertex, drawSelectedVertex, drawTargetVertex, getAnimationFrame, getTheme, getVerticesSortedByY, isAnimatingConfig, isBlinkEdges, isDrawCurvyEdges, setAnimatingConfig, setAnimationFrame, setBlinkEdges, setDrawCurvyEdges, tick, tickItpublic static final java.awt.Color MY_COLOR
public static final int LIGHT_WIDTH
public static final int LIGHT_HEIGHT
public static final java.lang.String LIGHTS_OUT_THEME
public int getNumberAnimatingFrames()
getNumberAnimatingFrames in class NewTheme<LightsInstance>public void setupMoveAnimation(DoubleVertexEvent<?> event)
NewThemesetupMoveAnimation in class NewTheme<LightsInstance>public java.lang.String getThemeName()
getThemeName in class NewTheme<LightsInstance>public void drawAnimation(java.awt.Graphics g,
LightsInstance game)
NewThemedrawAnimation in class NewTheme<LightsInstance>public int[] getAnimationStage(Vertex v, LightsInstance game)
NewThemegetAnimationStage in class NewTheme<LightsInstance>game - TODOpublic java.awt.Color scaleColor(java.awt.Color original,
int current,
int max)
public void drawVertex(java.awt.Graphics2D g,
LightsInstance game,
Vertex v)
NewThemedrawVertex in class NewTheme<LightsInstance>g - The graphics object to draw ongame - The PuzzleInstance subclass containing game datav - The vertex to be drawnpublic java.awt.Point getVertexCenter()
NewThemegetVertexCenter in class NewTheme<LightsInstance>public float getBrightnessFactor()
NewThemegetBrightnessFactor in class NewTheme<LightsInstance>public int getBoundingHeight()
NewThemegetBoundingHeight in class NewTheme<LightsInstance>public int getBoundingWidth()
NewThemegetBoundingWidth in class NewTheme<LightsInstance>public int getDrawingHeight()
NewThemegetDrawingHeight in class NewTheme<LightsInstance>public int getDrawingWidth()
NewThemegetDrawingWidth in class NewTheme<LightsInstance>public java.awt.Color getEdgeColor(LightsInstance game, Vertex a, Vertex b)
NewThemegetEdgeColor in class NewTheme<LightsInstance>game - The PuzzleInstance subclass containing game dataa - The first vertex connected by an edgeb - The second vertex connected by this edge