com.genuts.gameui
Class ScrollingTransparentImageSprite
java.lang.Object
|
+--com.genuts.gameui.Sprite
|
+--com.genuts.gameui.ScrollingImageSprite
|
+--com.genuts.gameui.ScrollingTransparentImageSprite
- All Implemented Interfaces:
- java.lang.Cloneable, Tickable
- public class ScrollingTransparentImageSprite
- extends ScrollingImageSprite
A scrolling image sprite is a background sprite in which
an image scrolls with a given speed.
This one provides the scrolling with an image with a transparent color.
- See Also:
ScrollingImageSprite
Constructor Summary |
ScrollingTransparentImageSprite(int w,
int h,
java.awt.Image image,
int vx,
int vy,
java.awt.Color transpColor)
Initialises the sprite. |
ScrollingTransparentImageSprite(int w,
int h,
java.awt.Image image,
int vx,
int vy,
int transpRGB)
Initialises the sprite. |
Methods inherited from class com.genuts.gameui.Sprite |
checkCollision, cloneSprite, collisionWith, getActionSprite, getBackground, getBottomCollisionOffset, getBounds, getFinalActionSprite, getFinalWrapper, getHeight, getId, getImage, getLeftCollisionOffset, getParent, getPosition, getRightCollisionOffset, getSize, getTopCollisionOffset, getWidth, getWrapper, getX, getY, invalidate, isBackgroundSprite, isPremode, isSpriteAt, isValidate, isVisible, preCollisionWith, repaint, setBackground, setBackgroundSprite, setBottomCollisionOffset, setBounds, setBounds, setId, setImage, setLeftCollisionOffset, setParent, setPosition, setPremode, setRightCollisionOffset, setTopCollisionOffset, setVisible, setWrapper, toString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ScrollingTransparentImageSprite
public ScrollingTransparentImageSprite(int w,
int h,
java.awt.Image image,
int vx,
int vy,
java.awt.Color transpColor)
- Initialises the sprite.
- Parameters:
w
- Width of the sprite.h
- height of the sprite.image
- Image of the scrolling.vx
- Speed on X coordinate.vy
- Speed on Y coordinate.transpColor
- Transparent color of the image.
ScrollingTransparentImageSprite
public ScrollingTransparentImageSprite(int w,
int h,
java.awt.Image image,
int vx,
int vy,
int transpRGB)
- Initialises the sprite.
- Parameters:
w
- Width of the sprite.h
- height of the sprite.image
- Image of the scrolling.vx
- Speed on X coordinate.vy
- Speed on Y coordinate.transpRGB
- Transparent RGB color of the image.
initScrollingImage
protected void initScrollingImage()
- Initialises scrollingImage. It transforms the image to
convert the desired color into transparence.
- Overrides:
initScrollingImage
in class ScrollingImageSprite
Genuts API