vooga.widget
Class MouseFollower

java.lang.Object
  extended by com.golden.gamedev.object.Sprite
      extended by vooga.engine.core.BetterSprite
          extended by vooga.widget.MouseFollower
Direct Known Subclasses:
Player

public class MouseFollower
extends BetterSprite


Constructor Summary
MouseFollower()
          Constructs an entity with null image and 0, 0 position and the default label.
MouseFollower(java.awt.image.BufferedImage image)
          Constructs an entity with the image and 0, 0 position
MouseFollower(java.awt.image.BufferedImage[] images)
          Construct an animated entity from an array of images
MouseFollower(java.awt.image.BufferedImage image, double x, double y)
          Constructs an entity with an image located at the specified coordinates and the default label.
MouseFollower(double x, double y)
          Constructs an entity with null image located at the specified coordinates with the default label.
MouseFollower(java.lang.String label, java.awt.image.BufferedImage image, double x, double y)
          Constructs an entity with given image located at specified coordinates AND labels the image so that you can switch to super initial sprite if other sprites are added to super entity later.
MouseFollower(java.lang.String label, com.golden.gamedev.object.Sprite s)
           
 
Method Summary
 void update(long elapsedTime)
          Specify how the GameEntity Object should be updated.
 
Methods inherited from class vooga.engine.core.BetterSprite
addAnimatedImages, addHorizontalSpeed, addImage, addSprite, addVerticalSpeed, firstRun, forceX, forceY, getCurrentSprite, getDistance, getDoubleStat, getHeight, getHorizontalSpeed, getImage, getIntStat, getStat, getTimeInExistence, getVerticalSpeed, getWidth, getX, getY, isActive, isOnScreen, move, moveTo, moveX, moveY, render, setActive, setAsRenderedSprite, setBackground, setDoubleStat, setHorizontalSpeed, setImage, setImages, setIntStat, setLayer, setLocation, setMovement, setSpeed, setStat, setVerticalSpeed, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseFollower

public MouseFollower()
Constructs an entity with null image and 0, 0 position and the default label.


MouseFollower

public MouseFollower(java.awt.image.BufferedImage image)
Constructs an entity with the image and 0, 0 position

Parameters:
image -

MouseFollower

public MouseFollower(java.lang.String label,
                     com.golden.gamedev.object.Sprite s)
Parameters:
name - is any name you'd like to give to the object.
state - State name is the name you'd like to map to the following Sprite object. e.g."alive" to represent a sprite that's a live, or "dead" if the sprite represents the entity in a dead state, etc
super - is the default Sprite that will represent super Entity on the Screen.

MouseFollower

public MouseFollower(java.awt.image.BufferedImage[] images)
Construct an animated entity from an array of images

Parameters:
image -

MouseFollower

public MouseFollower(java.awt.image.BufferedImage image,
                     double x,
                     double y)
Constructs an entity with an image located at the specified coordinates and the default label.

Parameters:
image -
x - is the x position.
y - is the y position.

MouseFollower

public MouseFollower(double x,
                     double y)
Constructs an entity with null image located at the specified coordinates with the default label.

Parameters:
x - is the x position.
y - is the y position.

MouseFollower

public MouseFollower(java.lang.String label,
                     java.awt.image.BufferedImage image,
                     double x,
                     double y)
Constructs an entity with given image located at specified coordinates AND labels the image so that you can switch to super initial sprite if other sprites are added to super entity later.

Parameters:
label - is the label for super sprite representation.
image -
x - is the x position.
y - is the y position.
Method Detail

update

public void update(long elapsedTime)
Description copied from class: BetterSprite
Specify how the GameEntity Object should be updated.

Overrides:
update in class BetterSprite