Genuts API

com.genuts.gameui
Class ScrollingTransparentImageSprite

java.lang.Object
  extended bycom.genuts.gameui.Sprite
      extended bycom.genuts.gameui.ScrollingImageSprite
          extended bycom.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

Field Summary
 
Fields inherited from class com.genuts.gameui.ScrollingImageSprite
scrollingImage, xScrollingPos, yScrollingPos
 
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.
 
Method Summary
protected  void initScrollingImage()
          Initialises scrollingImage.
 
Methods inherited from class com.genuts.gameui.ScrollingImageSprite
getScrollingImage, getSpeed, paint, setScrollingImage, setScrollingSpeed, setSize, tick
 
Methods inherited from class com.genuts.gameui.Sprite
checkCollision, cloneSprite, collisionWith, getActionSprite, getBackground, getBottomCollisionOffset, getBounds, getFinalActionSprite, getFinalWrapper, getHeight, getId, getImage, getLeftCollisionOffset, getParent, getPosition, getRightCollisionOffset, getRotation, 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, setRotation, setTopCollisionOffset, setVisible, setWrapper, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

initScrollingImage

protected void initScrollingImage()
Initialises scrollingImage. It transforms the image to convert the desired color into transparence.

Overrides:
initScrollingImage in class ScrollingImageSprite

Genuts API

Genuts API