javax.microedition.lcdui.game
Class Sprite
java.lang.Object
javax.microedition.lcdui.game.Layer
javax.microedition.lcdui.game.Sprite
public class Sprite
- extends Layer
Method Summary |
boolean |
collidesWith(Image image,
int x,
int y,
boolean pixelLevel)
|
boolean |
collidesWith(Sprite s,
boolean pixelLevel)
|
boolean |
collidesWith(TiledLayer t,
boolean pixelLevel)
|
void |
defineCollisionRectangle(int x,
int y,
int width,
int height)
|
void |
defineReferencePixel(int x,
int y)
|
int |
getFrame()
|
int |
getFrameSequenceLength()
|
int |
getRawFrameCount()
|
int |
getRefPixelX()
|
int |
getRefPixelY()
|
void |
nextFrame()
|
void |
paint(Graphics g)
|
void |
prevFrame()
|
void |
setFrame(int sequenceIndex)
|
void |
setFrameSequence(int[] sequence)
|
void |
setImage(Image img,
int frameWidth,
int frameHeight)
|
void |
setRefPixelPosition(int x,
int y)
|
void |
setTransform(int transform)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRANS_NONE
public static final int TRANS_NONE
- See Also:
- Constant Field Values
TRANS_ROT90
public static final int TRANS_ROT90
- See Also:
- Constant Field Values
TRANS_ROT180
public static final int TRANS_ROT180
- See Also:
- Constant Field Values
TRANS_ROT270
public static final int TRANS_ROT270
- See Also:
- Constant Field Values
TRANS_MIRROR
public static final int TRANS_MIRROR
- See Also:
- Constant Field Values
TRANS_MIRROR_ROT90
public static final int TRANS_MIRROR_ROT90
- See Also:
- Constant Field Values
TRANS_MIRROR_ROT180
public static final int TRANS_MIRROR_ROT180
- See Also:
- Constant Field Values
TRANS_MIRROR_ROT270
public static final int TRANS_MIRROR_ROT270
- See Also:
- Constant Field Values
Sprite
public Sprite(Image image)
Sprite
public Sprite(Image image,
int frameWidth,
int frameHeight)
Sprite
public Sprite(Sprite s)
defineReferencePixel
public void defineReferencePixel(int x,
int y)
setRefPixelPosition
public void setRefPixelPosition(int x,
int y)
getRefPixelX
public int getRefPixelX()
getRefPixelY
public int getRefPixelY()
setFrame
public void setFrame(int sequenceIndex)
getFrame
public int getFrame()
getRawFrameCount
public int getRawFrameCount()
getFrameSequenceLength
public int getFrameSequenceLength()
nextFrame
public void nextFrame()
prevFrame
public void prevFrame()
paint
public void paint(Graphics g)
- Specified by:
paint
in class Layer
setFrameSequence
public void setFrameSequence(int[] sequence)
setImage
public void setImage(Image img,
int frameWidth,
int frameHeight)
defineCollisionRectangle
public void defineCollisionRectangle(int x,
int y,
int width,
int height)
setTransform
public void setTransform(int transform)
collidesWith
public boolean collidesWith(Sprite s,
boolean pixelLevel)
collidesWith
public boolean collidesWith(TiledLayer t,
boolean pixelLevel)
collidesWith
public boolean collidesWith(Image image,
int x,
int y,
boolean pixelLevel)
Copyright © 2006-2007 Jayway AB. All Rights Reserved.