org.deken.game.animation
Class RectangleShapeAnimation

java.lang.Object
  extended by org.deken.game.animation.BaseAnimation
      extended by org.deken.game.animation.RectangleShapeAnimation
All Implemented Interfaces:
java.lang.Cloneable, Animation, Updateable

public class RectangleShapeAnimation
extends BaseAnimation

Title: SquareShapeAnimation

Description: Draws a Square image to the GameGFX.

Copyright: Copyright (c) Dec 29, 2010

Version:
1.0
Author:
Gary Deken

Field Summary
 
Fields inherited from class org.deken.game.animation.BaseAnimation
height, imageEffect, name, sequenceTime, sound, totalDuration, totalFrames, width, xOffset, yOffset
 
Constructor Summary
RectangleShapeAnimation(int width, int height, java.awt.Color color, boolean fill)
           
 
Method Summary
 void addFrame(java.awt.Image image, long duration)
          This animation has no frames.
 RectangleShapeAnimation copy()
          Copy Animation
 void draw(java.awt.Graphics2D graphics, int x, int y)
          Draws the current frame or shape of the animation at the set x and y location.
 java.awt.Image getFrame(int i)
          This animation as no Frame to return.
 java.awt.Image getImage()
          This animation has no image to return.
 boolean isAnimating()
          This animation is always in the same state.
 void reset()
          This animation has nothing to reset.
 void setDimensions(int width, int height)
           
 void update(long elapseTime)
          This animation has nothing to update.
 
Methods inherited from class org.deken.game.animation.BaseAnimation
addImageEffect, baseUpdate, copyParent, getHeight, getName, getSound, getTotalDuration, getWidth, getXOffset, getYOffset, setName, setOffsets, setSound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleShapeAnimation

public RectangleShapeAnimation(int width,
                               int height,
                               java.awt.Color color,
                               boolean fill)
Parameters:
width -
height -
color -
fill -
Method Detail

addFrame

public void addFrame(java.awt.Image image,
                     long duration)
This animation has no frames. This method does nothing.

Parameters:
image -
duration -

copy

public RectangleShapeAnimation copy()
Copy Animation

Returns:
CircleShapeAnimation

draw

public void draw(java.awt.Graphics2D graphics,
                 int x,
                 int y)
Description copied from interface: Animation
Draws the current frame or shape of the animation at the set x and y location. It also performs any offsets that are needed for the image.

Parameters:
graphics -
x -
y -

getFrame

public java.awt.Image getFrame(int i)
This animation as no Frame to return.

Parameters:
i -
Returns:
null

getImage

public java.awt.Image getImage()
This animation has no image to return.

Returns:
null

isAnimating

public boolean isAnimating()
This animation is always in the same state.

Returns:
true

reset

public void reset()
This animation has nothing to reset.


setDimensions

public void setDimensions(int width,
                          int height)

update

public void update(long elapseTime)
This animation has nothing to update.

Parameters:
elapseTime -