Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.siemens.mp.game
Class Sprite  view Sprite download Sprite.java

java.lang.Object
  extended bycom.siemens.mp.misc.NativeMem
      extended bycom.siemens.mp.game.GraphicObject
          extended bycom.siemens.mp.game.Sprite

public class Sprite
extends GraphicObject

Version:

Field Summary
(package private)  int collh
           
(package private)  int collw
           
(package private)  int collx
           
(package private)  int colly
           
(package private)  int frame
           
(package private)  javax.microedition.lcdui.Image[] mask
           
(package private)  javax.microedition.lcdui.Image[] pixels
           
(package private)  int x
           
(package private)  int y
           
 
Fields inherited from class com.siemens.mp.game.GraphicObject
 
Constructor Summary
Sprite(byte[] pixels, int pixel_offset, int width, int height, byte[] mask, int mask_offset, int numFrames)
           
Sprite(ExtendedImage pixels, ExtendedImage mask, int numFrames)
           
Sprite(javax.microedition.lcdui.Image pixels, javax.microedition.lcdui.Image mask, int numFrames)
           
 
Method Summary
 int getFrame()
           
 int getXPosition()
           
 int getYPosition()
           
 boolean isCollidingWith(Sprite other)
           
 boolean isCollidingWithPos(int xpos, int ypos)
           
protected  void paint(javax.microedition.lcdui.Graphics g)
           
 void setCollisionRectangle(int x, int y, int width, int height)
           
 void setFrame(int framenumber)
           
 void setPosition(int x, int y)
           
 
Methods inherited from class com.siemens.mp.game.GraphicObject
getVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pixels

javax.microedition.lcdui.Image[] pixels

mask

javax.microedition.lcdui.Image[] mask

x

int x

y

int y

frame

int frame

collx

int collx

colly

int colly

collw

int collw

collh

int collh
Constructor Detail

Sprite

public Sprite(byte[] pixels,
              int pixel_offset,
              int width,
              int height,
              byte[] mask,
              int mask_offset,
              int numFrames)

Sprite

public Sprite(ExtendedImage pixels,
              ExtendedImage mask,
              int numFrames)

Sprite

public Sprite(javax.microedition.lcdui.Image pixels,
              javax.microedition.lcdui.Image mask,
              int numFrames)
Method Detail

getFrame

public int getFrame()

getXPosition

public int getXPosition()

getYPosition

public int getYPosition()

isCollidingWith

public boolean isCollidingWith(Sprite other)

isCollidingWithPos

public boolean isCollidingWithPos(int xpos,
                                  int ypos)

setCollisionRectangle

public void setCollisionRectangle(int x,
                                  int y,
                                  int width,
                                  int height)

setFrame

public void setFrame(int framenumber)

setPosition

public void setPosition(int x,
                        int y)

paint

protected void paint(javax.microedition.lcdui.Graphics g)
Overrides:
paint in class GraphicObject