data
Class Sprite

java.lang.Object
  extended by data.Sprite

public class Sprite
extends java.lang.Object

Author:
Tansel

Field Summary
private  java.awt.Image image
          This is the image to be shown on the screen
 
Constructor Summary
Sprite(java.awt.Image image)
          Sprite is the visual to be drawn on the screen.
 
Method Summary
 void draw(int x, int y, java.awt.Graphics2D g)
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private java.awt.Image image
This is the image to be shown on the screen

Constructor Detail

Sprite

public Sprite(java.awt.Image image)
Sprite is the visual to be drawn on the screen.

Parameters:
image -
Method Detail

getWidth

public int getWidth()
Returns:
Width of the visual

getHeight

public int getHeight()
Returns:
Height of the visual

draw

public void draw(int x,
                 int y,
                 java.awt.Graphics2D g)