public class DropBlockSprite extends DropSprite
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST| Constructor and Description |
|---|
DropBlockSprite(DropBoardView view,
int col,
int row,
int orient,
int[] pieces)
Constructs a drop block sprite and starts it dropping.
|
DropBlockSprite(DropBoardView view,
int col,
int row,
int orient,
int[] pieces,
int renderOrder)
Constructs a drop block sprite and starts it dropping.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPopup()
Can this sprite pop-up a row on a forgiving rotation?
|
void |
didPopup()
Called if we pop up to decrement the remaining popups we have.
|
Rectangle |
getBoardBounds()
Returns the bounds of the block in board piece coordinates.
|
int[] |
getColumns()
Returns an array of the column numbers containing the block pieces.
|
int |
getExternalColumn()
Returns the column the external piece is located in.
|
int |
getExternalRow()
Returns the row the external piece is located in.
|
int[] |
getRows()
Returns an array of the row numbers containing the block pieces.
|
void |
setBoardLocation(int row,
int col)
Sets the row and column the piece is located in.
|
void |
setColumn(int col)
Sets the column the piece is located in.
|
void |
setOrientation(int orient)
Updates the sprite image offset to reflect the direction in which the external piece is
hanging.
|
void |
setRow(int row)
Set the row the piece is located in.
|
void |
toString(StringBuilder buf) |
drop, fastForward, getColumn, getDistance, getPercentDone, getPieces, getRow, getVelocity, inside, isBouncing, isDropping, paint, setBouncing, setColumnOffset, setPieces, setRowOffset, setVelocity, stop, tickaddSpriteObserver, cancelMove, contains, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, hitTest, intersects, isMoving, move, paintPath, pathBeginning, pathCompleted, removeSpriteObserver, setLocation, viewLocationDidChangecontains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toStringpublic DropBlockSprite(DropBoardView view, int col, int row, int orient, int[] pieces)
view - the board view upon which this sprite will be displayed.col - the column of the central piece.row - the row of the central piece.orient - the orientation of the sprite.pieces - the pieces displayed by the sprite.public DropBlockSprite(DropBoardView view, int col, int row, int orient, int[] pieces, int renderOrder)
view - the board view upon which this sprite will be displayed.col - the column of the central piece.row - the row of the central piece.orient - the orientation of the sprite.pieces - the pieces displayed by the sprite.renderOrder - the rendering order of the sprite.public int[] getRows()
public int[] getColumns()
public Rectangle getBoardBounds()
public int getExternalRow()
public int getExternalColumn()
public void setColumn(int col)
DropSpritesetColumn in class DropSpritepublic void setRow(int row)
DropSpritesetRow in class DropSpritepublic void setBoardLocation(int row,
int col)
DropSpritesetBoardLocation in class DropSpritepublic void setOrientation(int orient)
setOrientation in interface com.threerings.media.util.PathablesetOrientation in class DropSpritepublic void toString(StringBuilder buf)
toString in class DropSpritepublic boolean canPopup()
public void didPopup()
Copyright © 2015. All rights reserved.