org.deken.game.background
Interface Background

All Superinterfaces:
Updateable
All Known Implementing Classes:
FixedBackground, LayeredBackground, PanLengthBackground, PanSpeedBackground, ParallaxBackground, ParallaxWrapBackground, ScrollBackground

public interface Background
extends Updateable

Title: Background

Description: Interface for describing the backgrounds rendering process, if it is static, scrolling, parallax or something else.

Copyright: (c) 2010

Version:
1.0
Author:
Gary Deken

Method Summary
 void addAnimation(Animation animation)
           
 void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
          Draws the back ground based on the current offset of the map, and the Backgrounds equation for calculating its position.
 void setMapSize(MapSize mapSize)
          Set the map size, so the back ground can be adjusted accordingly.
 void setScreenSize(int width, int height)
          Set the screen size, so the back ground can be adjusted accordingly.
 
Methods inherited from interface org.deken.game.Updateable
getName, update
 

Method Detail

addAnimation

void addAnimation(Animation animation)

draw

void draw(java.awt.Graphics2D graphics,
          int xOffset,
          int yOffset)
Draws the back ground based on the current offset of the map, and the Backgrounds equation for calculating its position.

Parameters:
graphics -
xOffset - int
yOffset - int

setScreenSize

void setScreenSize(int width,
                   int height)
Set the screen size, so the back ground can be adjusted accordingly.

Parameters:
width - int
height - int

setMapSize

void setMapSize(MapSize mapSize)
Set the map size, so the back ground can be adjusted accordingly.

Parameters:
mapSize - int