org.deken.game.motion
Class BaseMotion

java.lang.Object
  extended by org.deken.game.motion.BaseMotion
All Implemented Interfaces:
Motion
Direct Known Subclasses:
CardinalMotion, FourWayMotion, SingleMotion, StaticMotion, TwoWayMotion

public abstract class BaseMotion
extends java.lang.Object
implements Motion

Title: BaseMotion

Description:

Copyright: Copyright (c) Jan 18, 2015

Version:
1.0
Author:
Gary Deken

Field Summary
protected  BoundingBox boundingBox
           
protected  boolean boundingBoxSet
           
 
Constructor Summary
BaseMotion()
           
 
Method Summary
 BoundingBox getBounds()
          Returns the motions BoundingBox for collision detection at the Motion level.
 boolean isBoundsSet()
          Returns true if the BoundingBox is set for Collision.
 void setBoundingBox(BoundingBox boundingBox)
          Set the BoundingBox size for Collision detection at the Motion level.
 void setBoundingBox(int left, int top, int right, int bottom)
          Set the BoundingBox size for Collision detection at the Motion level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deken.game.motion.Motion
copy, draw, getAnimations, getDirection, getImage, getName, reset, setDirection, setName, update
 

Field Detail

boundingBox

protected BoundingBox boundingBox

boundingBoxSet

protected boolean boundingBoxSet
Constructor Detail

BaseMotion

public BaseMotion()
Method Detail

getBounds

public BoundingBox getBounds()
Description copied from interface: Motion
Returns the motions BoundingBox for collision detection at the Motion level.

Specified by:
getBounds in interface Motion
Returns:
BoundingBox

isBoundsSet

public boolean isBoundsSet()
Description copied from interface: Motion
Returns true if the BoundingBox is set for Collision.

Specified by:
isBoundsSet in interface Motion
Returns:
boolean

setBoundingBox

public void setBoundingBox(BoundingBox boundingBox)
Description copied from interface: Motion
Set the BoundingBox size for Collision detection at the Motion level.

Specified by:
setBoundingBox in interface Motion

setBoundingBox

public void setBoundingBox(int left,
                           int top,
                           int right,
                           int bottom)
Description copied from interface: Motion
Set the BoundingBox size for Collision detection at the Motion level.

Specified by:
setBoundingBox in interface Motion