public class SquidLayers extends com.badlogic.gdx.scenes.scene2d.Group
| Modifier and Type | Field and Description |
|---|---|
protected float |
animationDuration |
protected SquidPanel |
backgroundPanel |
protected int[][] |
bgIndices |
protected int |
cellHeight |
protected int |
cellWidth |
static char |
EMPTY_CELL |
protected ArrayList<SquidPanel> |
extraPanels |
protected SquidPanel |
foregroundPanel |
protected int |
height |
protected ArrayList<com.badlogic.gdx.graphics.Color> |
lightingPalette |
protected int[][] |
lightnesses |
protected SquidPanel |
lightnessPanel |
protected ArrayList<com.badlogic.gdx.graphics.Color> |
palette |
protected TextCellFactory |
textFactory |
protected boolean[][] |
values |
protected int |
width |
| Constructor and Description |
|---|
SquidLayers()
Create a new SquidLayers widget with the default square font, 40 cells wide and high, with a size of
12x12 pixels for each cell.
|
SquidLayers(int gridWidth,
int gridHeight)
Create a new SquidLayers widget with the default square font, the given number of cells for gridWidth
and gridHeight, and 12x12 pixels for each cell.
|
SquidLayers(int gridWidth,
int gridHeight,
int cellWidth,
int cellHeight)
Create a new SquidLayers widget with a default font (it will be square if cellWidth and cellHeight are equal, or
narrow otherwise), the given number of cells for gridWidth
and gridHeight, and the size in pixels for each cell given by cellWidth and cellHeight.
|
SquidLayers(int gridWidth,
int gridHeight,
int cellWidth,
int cellHeight,
String fontpath)
Create a new SquidLayers widget with the given path to a Font file, the given number of cells for gridWidth
and gridHeight, and the size in pixels for each cell given by cellWidth and cellHeight.
|
| Modifier and Type | Method and Description |
|---|---|
SquidLayers |
addExtraLayer()
Add an extra layer on top of the foreground layer.
|
ArrayList<com.badlogic.gdx.graphics.Color> |
alterPalette(int index,
com.badlogic.gdx.graphics.Color color)
Changes a color at the specified index in the default palette, then returns that palette.
|
AnimatedEntity |
animateActor(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color color,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
int index) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
int index,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
char c,
int index,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
com.badlogic.gdx.graphics.Color color) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
com.badlogic.gdx.graphics.Color color,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
com.badlogic.gdx.graphics.Color color,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
com.badlogic.gdx.graphics.Color color,
int layer,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
int index) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
int index,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
String s,
int index,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
boolean doubleWidth,
boolean stretch) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
com.badlogic.gdx.graphics.Color color) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
com.badlogic.gdx.graphics.Color color,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
com.badlogic.gdx.graphics.Color color,
boolean doubleWidth,
boolean stretch) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
com.badlogic.gdx.graphics.Color color,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
com.badlogic.gdx.graphics.Color color,
int layer,
boolean doubleWidth,
boolean stretch) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette,
int layer) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette,
int layer,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
ArrayList<com.badlogic.gdx.graphics.Color> palette,
int layer,
boolean doubleWidth,
boolean stretch) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
boolean doubleWidth) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
boolean doubleWidth,
boolean stretch) |
AnimatedEntity |
animateActor(int x,
int y,
com.badlogic.gdx.graphics.g2d.TextureRegion tr,
int index,
int layer) |
SquidLayers |
bump(AnimatedEntity ae,
squidpony.squidgrid.Direction dir) |
SquidLayers |
bump(AnimatedEntity ae,
int layer,
squidpony.squidgrid.Direction dir,
float duration) |
SquidLayers |
bump(int x,
int y,
squidpony.squidgrid.Direction dir) |
SquidLayers |
bump(int x,
int y,
int layer,
squidpony.squidgrid.Direction dir,
float duration) |
SquidLayers |
clear(int x,
int y)
Clear one cell at position x, y of its foreground contents.
|
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha) |
void |
drawActor(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha,
AnimatedEntity ae) |
void |
drawActor(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha,
AnimatedEntity ae,
int layer) |
SquidLayers |
erase()
Erase everything visible in all cells or all layers.
|
ArrayList<com.badlogic.gdx.graphics.Color> |
extendPalette(com.badlogic.gdx.graphics.Color color)
Adds a color to the end of the default palette, then returns that palette.
|
LinkedHashSet<AnimatedEntity> |
getAnimatedEntities() |
LinkedHashSet<AnimatedEntity> |
getAnimatedEntities(int layer) |
AnimatedEntity |
getAnimatedEntityByCell(int x,
int y) |
AnimatedEntity |
getAnimatedEntityByCell(int x,
int y,
int layer) |
float |
getAnimationDuration() |
int[][] |
getBgIndices()
Get all the background color indices at once, which are probably indexed into the default palette.
|
int |
getCellHeight()
Height of one cell in pixels.
|
int |
getCellWidth()
Width of one cell in pixels.
|
int |
getGridHeight()
Height of the map in grid cells.
|
int |
getGridWidth()
Width of the map in grid cells.
|
float |
getHeight()
The pixel height of the entire map.
|
int[][] |
getLightnesses()
Get the lightness modifiers used for background cells as an int[][], with elements between 0 and 511, 256 as the
unmodified lightness level, lower numbers meaning darker, and higher meaning lighter.
|
ArrayList<com.badlogic.gdx.graphics.Color> |
getPalette()
Gets the current palette used when no other is specified.
|
TextCellFactory |
getTextFactory() |
float |
getWidth()
The pixel width of the entire map.
|
boolean |
hasActiveAnimations() |
boolean |
hasValue(int x,
int y)
Very basic check to see if something was rendered at the x,y cell requested.
|
SquidLayers |
highlight(int x,
int y,
int lightness)
Change the lightness for the background of the cell at x, y (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
highlight(int x,
int y,
int[][] lightness)
Change the lightness for the background of the cell at x, y (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char c)
Place a char c into the foreground at position x, y, with the default color.
|
SquidLayers |
put(int x,
int y,
char[][] c) |
SquidLayers |
put(int x,
int y,
char[][] c,
ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette,
int[][] foregroundIndex,
int[][] backgroundIndex,
int[][] backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char[][] c,
com.badlogic.gdx.graphics.Color[][] foregrounds,
com.badlogic.gdx.graphics.Color[][] backgrounds,
int[][] backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char[][] c,
int[][] foregroundIndex) |
SquidLayers |
put(int x,
int y,
char[][] c,
int[][] foregroundIndex,
ArrayList<com.badlogic.gdx.graphics.Color> fgPalette,
int[][] backgroundIndex,
ArrayList<com.badlogic.gdx.graphics.Color> bgPalette,
int[][] backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char[][] c,
int[][] foregroundIndex,
int[][] backgroundIndex) |
SquidLayers |
put(int x,
int y,
char[][] c,
int[][] foregroundIndex,
int[][] backgroundIndex,
int[][] backgroundLightness)
Place a char[][] c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char c,
ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette,
int foregroundIndex,
int backgroundIndex,
int backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color foreground)
Place a char c into the foreground, with a foreground color specified by an index into the default palette.
|
SquidLayers |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color foreground,
com.badlogic.gdx.graphics.Color background)
Place a char c into the foreground, with a foreground color specified by an index into the default palette, and a
background color specified in the same way.
|
SquidLayers |
put(int x,
int y,
char c,
com.badlogic.gdx.graphics.Color foreground,
com.badlogic.gdx.graphics.Color background,
int backgroundLightness)
Place a char c into the foreground, with a foreground and background libGDX Color and a lightness variation for
the background (0 is no change, 100 is very bright, -100 is very dark, anything past -150 or 150 will make the
background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char c,
int foregroundIndex)
Place a char c into the foreground, with a foreground color specified by an index into the default palette.
|
SquidLayers |
put(int x,
int y,
char c,
int foregroundIndex,
ArrayList<com.badlogic.gdx.graphics.Color> fgPalette,
int backgroundIndex,
ArrayList<com.badlogic.gdx.graphics.Color> bgPalette,
int backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into alternatePalette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
put(int x,
int y,
char c,
int foregroundIndex,
int backgroundIndex)
Place a char c into the foreground, with a foreground color specified by an index into the default palette, and a
background color specified in the same way.
|
SquidLayers |
put(int x,
int y,
char c,
int foregroundIndex,
int backgroundIndex,
int backgroundLightness)
Place a char c into the foreground, with a foreground color specified by an index into the default palette, a
background color specified in the same way, and a lightness variation for the background (0 is no change, 100 is
very bright, -100 is very dark, anything past -150 or 150 will make the background almost fully black or white).
|
SquidLayers |
putBoxedString(int x,
int y,
String s)
A utility method that draws a 1-cell-wide black box around the text you request (as s) and replaces the contents
of anything that was below or adjacent to the string's new position.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char c)
Place a char c[][] into the specified layer, with a color specified by an index into alternatePalette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char[][] c)
Place a char c[][] into the specified layer, with a color specified by an index into alternatePalette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char[][] c,
ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette,
int[][] colorIndex)
Place a char c[][] into the specified layer, with a color specified by an index into alternatePalette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char[][] c,
com.badlogic.gdx.graphics.Color[][] colors)
Place a char c[][] into the specified layer, with a color specified by an index into alternatePalette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char[][] c,
int[][] colorIndex)
Place a char c[][] into the specified layer, with a color specified by an index into the default palette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char c,
ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette,
int colorIndex)
Place a char c[][] into the specified layer, with a color specified by an index into alternatePalette.
|
SquidLayers |
putInto(int layer,
int x,
int y,
char c,
int colorIndex)
Place a char c[][] into the specified layer, with a color specified by an index into the default palette.
|
SquidLayers |
putString(int x,
int y,
String s)
Put a string at the given x, y position, using the default color.
|
SquidLayers |
putString(int x,
int y,
String s,
ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette,
int foregroundIndex,
int backgroundIndex)
Put a string at the given x, y position, with the given indices for foreground and background color that look up
their index in alternatePalette.
|
SquidLayers |
putString(int x,
int y,
String s,
com.badlogic.gdx.graphics.Color foreground,
com.badlogic.gdx.graphics.Color background)
Put a string at the given x, y position, with the given indices for foreground and background color that look up
their index in alternatePalette.
|
SquidLayers |
putString(int x,
int y,
String s,
int foregroundIndex)
Put a string at the given x, y position, with the given index for foreground color that gets looked up in the
default palette.
|
SquidLayers |
putString(int x,
int y,
String s,
int foregroundIndex,
int backgroundIndex)
Put a string at the given x, y position, with the given indices for foreground and background color that look up
their index in the default palette.
|
void |
setAnimationDuration(float animationDuration) |
void |
setBgIndices(int[][] bgIndices)
Set all of the background colors at once, using indexes into what is probably the default palette unless
otherwise specified in the call to put().
|
void |
setLightnesses(int[][] lightnesses)
Sets the lightness modifiers used for background cells with the int[][] passed as lightnesses.
|
SquidLayers |
slide(AnimatedEntity ae,
int endX,
int endY) |
SquidLayers |
slide(AnimatedEntity ae,
int endX,
int endY,
int layer,
float duration) |
SquidLayers |
slide(int x,
int y,
int endX,
int endY) |
SquidLayers |
slide(int x,
int y,
int endX,
int endY,
int layer,
float duration) |
SquidLayers |
tint(AnimatedEntity ae,
com.badlogic.gdx.graphics.Color color) |
SquidLayers |
tint(AnimatedEntity ae,
com.badlogic.gdx.graphics.Color color,
int layer,
float duration) |
SquidLayers |
tint(int x,
int y,
com.badlogic.gdx.graphics.Color color) |
SquidLayers |
tint(int x,
int y,
com.badlogic.gdx.graphics.Color color,
int layer,
float duration) |
SquidLayers |
wiggle(AnimatedEntity ae) |
SquidLayers |
wiggle(AnimatedEntity ae,
int layer,
float duration) |
SquidLayers |
wiggle(int x,
int y) |
SquidLayers |
wiggle(int x,
int y,
int layer,
float duration) |
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, childrenChanged, clear, clearChildren, computeTransform, debugAll, drawChildren, drawDebug, drawDebugChildren, findActor, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toStringaddAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebugBounds, fire, getActions, getCaptureListeners, getColor, getDebug, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getX, getX, getY, getY, getZIndex, hasActions, hasParent, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFrontprotected int width
protected int height
protected int cellWidth
protected int cellHeight
protected SquidPanel backgroundPanel
protected SquidPanel lightnessPanel
protected SquidPanel foregroundPanel
protected int[][] bgIndices
protected int[][] lightnesses
protected ArrayList<SquidPanel> extraPanels
protected TextCellFactory textFactory
protected ArrayList<com.badlogic.gdx.graphics.Color> lightingPalette
protected boolean[][] values
protected float animationDuration
public static final char EMPTY_CELL
public SquidLayers()
public SquidLayers(int gridWidth, int gridHeight)
gridWidth - in grid cellsgridHeight - in grid cellspublic SquidLayers(int gridWidth, int gridHeight, int cellWidth, int cellHeight)
gridWidth - in grid cellsgridHeight - in grid cellscellWidth - in pixelscellHeight - in pixelspublic SquidLayers(int gridWidth, int gridHeight, int cellWidth, int cellHeight, String fontpath)
gridWidth - in grid cellsgridHeight - in grid cellscellWidth - in pixelscellHeight - in pixelsfontpath - A Font that should have been assigned a size before being passed here.public float getWidth()
getWidth in class com.badlogic.gdx.scenes.scene2d.Actorpublic float getHeight()
getHeight in class com.badlogic.gdx.scenes.scene2d.Actorpublic int getGridWidth()
public int getGridHeight()
public int getCellWidth()
public int getCellHeight()
public float getAnimationDuration()
public void setAnimationDuration(float animationDuration)
public TextCellFactory getTextFactory()
public ArrayList<com.badlogic.gdx.graphics.Color> getPalette()
public int[][] getLightnesses()
public int[][] getBgIndices()
public void setLightnesses(int[][] lightnesses)
lightnesses - 2D array, width and height should match this class' gridWidth and gridHeight. elements must
be between 0 and 511.public void setBgIndices(int[][] bgIndices)
bgIndices - 2D array, width and height should match this class' gridWidth and gridHeight.public SquidLayers addExtraLayer()
public ArrayList<com.badlogic.gdx.graphics.Color> extendPalette(com.badlogic.gdx.graphics.Color color)
color - public ArrayList<com.badlogic.gdx.graphics.Color> alterPalette(int index, com.badlogic.gdx.graphics.Color color)
index - must be at least 0 and less than the length of palette (starts at length 40).color - public SquidLayers put(int x, int y, char c)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundpublic SquidLayers put(int x, int y, char c, int foregroundIndex)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforegroundIndex - int index into the default palette for the char being drawnpublic SquidLayers put(int x, int y, char c, com.badlogic.gdx.graphics.Color foreground)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforeground - Color for the char being drawnpublic SquidLayers put(int x, int y, char c, int foregroundIndex, int backgroundIndex)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforegroundIndex - int index into the default palette for the char being drawnbackgroundIndex - int index into the default palette for the backgroundpublic SquidLayers put(int x, int y, char c, com.badlogic.gdx.graphics.Color foreground, com.badlogic.gdx.graphics.Color background)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforeground - Color for the char being drawnbackground - Color for the backgroundpublic SquidLayers put(int x, int y, char c, int foregroundIndex, int backgroundIndex, int backgroundLightness)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforegroundIndex - int index into the default palette for the char being drawnbackgroundIndex - int index into the default palette for the backgroundbackgroundLightness - int between -255 and 255 , lower numbers are darker, higher lighter.public SquidLayers put(int x, int y, char c, ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette, int foregroundIndex, int backgroundIndex, int backgroundLightness)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundalternatePalette - an alternate Color ArrayList for both foreground and backgroundforegroundIndex - int index into alternatePalette for the char being drawnbackgroundIndex - int index into alternatePalette for the backgroundbackgroundLightness - int between -255 and 255 , lower numbers are darker, higher lighter.public SquidLayers put(int x, int y, char c, com.badlogic.gdx.graphics.Color foreground, com.badlogic.gdx.graphics.Color background, int backgroundLightness)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforeground - Color for the char being drawnbackground - Color for the backgroundbackgroundLightness - int between -255 and 255 , lower numbers are darker, higher lighter.public SquidLayers put(int x, int y, char c, int foregroundIndex, ArrayList<com.badlogic.gdx.graphics.Color> fgPalette, int backgroundIndex, ArrayList<com.badlogic.gdx.graphics.Color> bgPalette, int backgroundLightness)
x - in grid cells.y - in grid cells.c - a character to be drawn in the foregroundforegroundIndex - int index into alternatePalette for the char being drawnfgPalette - an alternate Color ArrayList for the foreground; can be null to use the default.backgroundIndex - int index into alternatePalette for the backgroundbgPalette - an alternate Color ArrayList for the background; can be null to use the default.backgroundLightness - int between -255 and 255 , lower numbers are darker, higher lighter.public SquidLayers put(int x, int y, char[][] c)
public SquidLayers put(int x, int y, char[][] c, int[][] foregroundIndex)
public SquidLayers put(int x, int y, char[][] c, int[][] foregroundIndex, int[][] backgroundIndex)
public SquidLayers put(int x, int y, char[][] c, int[][] foregroundIndex, int[][] backgroundIndex, int[][] backgroundLightness)
x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yforegroundIndex - int[][] of indices into the default palette for the char being drawnbackgroundIndex - int[][] of indices into the default palette for the backgroundbackgroundLightness - int[][] with elements between -255 and 255 , lower darker, higher lighter.public SquidLayers put(int x, int y, char[][] c, ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette, int[][] foregroundIndex, int[][] backgroundIndex, int[][] backgroundLightness)
x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yalternatePalette - an alternate Color ArrayList for both foreground and backgroundforegroundIndex - int[][] of indices into alternatePalette for the char being drawnbackgroundIndex - int[][] of indices into alternatePalette for the backgroundbackgroundLightness - int[][] with elements between -255 and 255 , lower darker, higher lighter.public SquidLayers put(int x, int y, char[][] c, com.badlogic.gdx.graphics.Color[][] foregrounds, com.badlogic.gdx.graphics.Color[][] backgrounds, int[][] backgroundLightness)
x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yforegrounds - int[][] of indices into alternatePalette for the char being drawnbackgrounds - int[][] of indices into alternatePalette for the backgroundbackgroundLightness - int[][] with elements between -255 and 255 , lower darker, higher lighter.public SquidLayers put(int x, int y, char[][] c, int[][] foregroundIndex, ArrayList<com.badlogic.gdx.graphics.Color> fgPalette, int[][] backgroundIndex, ArrayList<com.badlogic.gdx.graphics.Color> bgPalette, int[][] backgroundLightness)
x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yforegroundIndex - int[][] of indices into fgPalette for the char being drawnfgPalette - an alternate Color ArrayList for the foreground; can be null to use the default.backgroundIndex - int[][] of indices into bgPalette for the backgroundbgPalette - an alternate Color ArrayList for the background; can be null to use the default.backgroundLightness - int[][] with elements between -255 and 255 , lower darker, higher lighter.public SquidLayers putInto(int layer, int x, int y, char c)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, ypublic SquidLayers putInto(int layer, int x, int y, char c, int colorIndex)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, ycolorIndex - int[][] of indices into alternatePalette for the char being drawnpublic SquidLayers putInto(int layer, int x, int y, char c, ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette, int colorIndex)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yalternatePalette - an alternate Color ArrayList for both foreground and backgroundcolorIndex - int[][] of indices into alternatePalette for the char being drawnpublic SquidLayers putInto(int layer, int x, int y, char[][] c)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, ypublic SquidLayers putInto(int layer, int x, int y, char[][] c, int[][] colorIndex)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, ycolorIndex - int[][] of indices into alternatePalette for the char being drawnpublic SquidLayers putInto(int layer, int x, int y, char[][] c, ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette, int[][] colorIndex)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, yalternatePalette - an alternate Color ArrayList for both foreground and backgroundcolorIndex - int[][] of indices into alternatePalette for the char being drawnpublic SquidLayers putInto(int layer, int x, int y, char[][] c, com.badlogic.gdx.graphics.Color[][] colors)
layer - 0 for background, 1 for lightness, 2 for foreground, 3 or higher for extra layers added on.x - in grid cells.y - in grid cells.c - char[][] to be drawn in the foreground starting from x, ycolors - int[][] of indices into alternatePalette for the char being drawnpublic SquidLayers putString(int x, int y, String s)
x - in grid cells.y - in grid cells.s - the string to printpublic SquidLayers putString(int x, int y, String s, int foregroundIndex)
x - in grid cells.y - in grid cells.s - the string to printforegroundIndex - public SquidLayers putString(int x, int y, String s, int foregroundIndex, int backgroundIndex)
x - in grid cells.y - in grid cells.s - the string to printforegroundIndex - backgroundIndex - public SquidLayers putString(int x, int y, String s, ArrayList<com.badlogic.gdx.graphics.Color> alternatePalette, int foregroundIndex, int backgroundIndex)
x - in grid cells.y - in grid cells.s - the string to printalternatePalette - foregroundIndex - backgroundIndex - public SquidLayers putString(int x, int y, String s, com.badlogic.gdx.graphics.Color foreground, com.badlogic.gdx.graphics.Color background)
x - in grid cells.y - in grid cells.s - the string to printforeground - the Color of the string's charsbackground - the Color of the background of the stringpublic SquidLayers putBoxedString(int x, int y, String s)
x - in grid cells.y - in grid cells.s - the string to print inside the boxpublic SquidLayers highlight(int x, int y, int lightness)
x - in grid cells.y - in grid cells.lightness - int between -255 and 255 , lower numbers are darker, higher lighter.public SquidLayers highlight(int x, int y, int[][] lightness)
x - in grid cells.y - in grid cells.lightness - int[][] with elements between -255 and 255 , lower numbers are darker, higher lighter.public boolean hasValue(int x, int y)
x - in grid cells.y - in grid cells.public SquidLayers clear(int x, int y)
x - in grid cellsy - in grid cellspublic SquidLayers erase()
public SquidLayers bump(int x, int y, int layer, squidpony.squidgrid.Direction dir, float duration)
public SquidLayers bump(AnimatedEntity ae, int layer, squidpony.squidgrid.Direction dir, float duration)
public SquidLayers bump(int x, int y, squidpony.squidgrid.Direction dir)
public SquidLayers bump(AnimatedEntity ae, squidpony.squidgrid.Direction dir)
public SquidLayers slide(AnimatedEntity ae, int endX, int endY, int layer, float duration)
public SquidLayers slide(int x, int y, int endX, int endY, int layer, float duration)
public SquidLayers slide(int x, int y, int endX, int endY)
public SquidLayers slide(AnimatedEntity ae, int endX, int endY)
public SquidLayers wiggle(int x, int y, int layer, float duration)
public SquidLayers wiggle(AnimatedEntity ae, int layer, float duration)
public SquidLayers wiggle(int x, int y)
public SquidLayers wiggle(AnimatedEntity ae)
public SquidLayers tint(int x, int y, com.badlogic.gdx.graphics.Color color, int layer, float duration)
public SquidLayers tint(AnimatedEntity ae, com.badlogic.gdx.graphics.Color color, int layer, float duration)
public SquidLayers tint(int x, int y, com.badlogic.gdx.graphics.Color color)
public SquidLayers tint(AnimatedEntity ae, com.badlogic.gdx.graphics.Color color)
public boolean hasActiveAnimations()
public AnimatedEntity animateActor(int x, int y, char c, com.badlogic.gdx.graphics.Color color, int layer)
public AnimatedEntity animateActor(int x, int y, char c, com.badlogic.gdx.graphics.Color color)
public AnimatedEntity animateActor(int x, int y, char c, com.badlogic.gdx.graphics.Color color, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, char c, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette, int layer)
public AnimatedEntity animateActor(int x, int y, char c, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette)
public AnimatedEntity animateActor(int x, int y, char c, int index, int layer)
public AnimatedEntity animateActor(int x, int y, char c, int index)
public AnimatedEntity animateActor(int x, int y, char c, int index, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, String s, com.badlogic.gdx.graphics.Color color, int layer)
public AnimatedEntity animateActor(int x, int y, String s, com.badlogic.gdx.graphics.Color color, int layer, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, com.badlogic.gdx.graphics.Color color, int layer)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, com.badlogic.gdx.graphics.Color color, int layer, boolean doubleWidth, boolean stretch)
public AnimatedEntity animateActor(int x, int y, String s, com.badlogic.gdx.graphics.Color color)
public AnimatedEntity animateActor(int x, int y, String s, com.badlogic.gdx.graphics.Color color, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, String s, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette, int layer)
public AnimatedEntity animateActor(int x, int y, String s, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette)
public AnimatedEntity animateActor(int x, int y, String s, int index, int layer)
public AnimatedEntity animateActor(int x, int y, String s, int index)
public AnimatedEntity animateActor(int x, int y, String s, int index, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, com.badlogic.gdx.graphics.Color color)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, com.badlogic.gdx.graphics.Color color, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, com.badlogic.gdx.graphics.Color color, boolean doubleWidth, boolean stretch)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette, int layer)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette, int layer, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette, int layer, boolean doubleWidth, boolean stretch)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, ArrayList<com.badlogic.gdx.graphics.Color> palette)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, int layer)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, int index, boolean doubleWidth, boolean stretch)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, boolean doubleWidth)
public AnimatedEntity animateActor(int x, int y, com.badlogic.gdx.graphics.g2d.TextureRegion tr, boolean doubleWidth, boolean stretch)
public LinkedHashSet<AnimatedEntity> getAnimatedEntities(int layer)
public LinkedHashSet<AnimatedEntity> getAnimatedEntities()
public AnimatedEntity getAnimatedEntityByCell(int x, int y, int layer)
public AnimatedEntity getAnimatedEntityByCell(int x, int y)
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
draw in class com.badlogic.gdx.scenes.scene2d.Grouppublic void drawActor(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, AnimatedEntity ae, int layer)
public void drawActor(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha, AnimatedEntity ae)
Copyright © 2012–2015. All rights reserved.