org.deken.game.sprites
Class MirrorTile

java.lang.Object
  extended by org.deken.game.sprites.Sprite
      extended by org.deken.game.sprites.Decor
          extended by org.deken.game.sprites.MirrorTile
All Implemented Interfaces:
Updateable

public class MirrorTile
extends Decor

Title: WrapTile

Description: This tile is use as a place holder for a point where the player will wrap from one point to another.

Copyright: Copyright (c) Mar 17, 2012

Version:
1.0
Author:
Gary Deken

Field Summary
 
Fields inherited from class org.deken.game.sprites.Decor
animation
 
Fields inherited from class org.deken.game.sprites.Sprite
boundingBox, collisionMap, location, size
 
Constructor Summary
MirrorTile(SpriteSize size)
           
 
Method Summary
 Decor copy()
          Due to the Mirroring of two tiles this Decor does not copy, but returns itself.
 void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
          Draw
 MirrorTile getMirrorToTile()
           
 void setMirrorToTile(MirrorTile mirrorToTile)
          Sets the tile this wraps to, and adds itself to the other tile.
 void spriteCollison(Sprite collideSprite)
          Handle the collision with another sprite.
 
Methods inherited from class org.deken.game.sprites.Decor
copyBase, getAnimation, setAnimation, update
 
Methods inherited from class org.deken.game.sprites.Sprite
getBounds, getDepth, getHeight, getLocation, getName, getSize, getWidth, getXLocation, getYLocation, removeFromMap, setBoundingBox, setBoundingBox, setCollisionMap, setLocation, setName, setSize, toString, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MirrorTile

public MirrorTile(SpriteSize size)
Method Detail

getMirrorToTile

public MirrorTile getMirrorToTile()

setMirrorToTile

public void setMirrorToTile(MirrorTile mirrorToTile)
Sets the tile this wraps to, and adds itself to the other tile.

Parameters:
mirrorToTile - MirrorTile

spriteCollison

public void spriteCollison(Sprite collideSprite)
Description copied from class: Sprite
Handle the collision with another sprite.

Overrides:
spriteCollison in class Decor

draw

public void draw(java.awt.Graphics2D graphics,
                 int xOffset,
                 int yOffset)
Description copied from class: Decor
Draw

Overrides:
draw in class Decor
Parameters:
graphics -
xOffset -
yOffset -

copy

public Decor copy()
Due to the Mirroring of two tiles this Decor does not copy, but returns itself.

Overrides:
copy in class Decor
Returns:
This Object.