game.graphics
Class CMovingRect

java.lang.Object
  extended by game.physics.CStaticShape
      extended by game.physics.CDynamicShape
          extended by game.physics.CColoredDynamicShape
              extended by game.graphics.CMovingRect
All Implemented Interfaces:
ICriticalObject, IGraphicObject

public class CMovingRect
extends CColoredDynamicShape
implements ICriticalObject

A colored rectangle bouncing on the game's display area's limits. The simplest form of CDynamicShape.

Author:
sroccaserra

Field Summary
 
Fields inherited from class game.physics.CColoredDynamicShape
m_color
 
Fields inherited from class game.physics.CDynamicShape
G, m_bApplyGravity, m_bBouceOnGameRect, m_v
 
Fields inherited from class game.physics.CStaticShape
m_box, m_gameDisplay, m_isHidden
 
Fields inherited from interface game.graphics.ICriticalObject
CRITICAL_VALUE
 
Constructor Summary
CMovingRect(IGameDisplay gameRect, CBoundingBox boundingBox, CVector2D speed, java.awt.Color color)
           
 
Method Summary
 void draw(java.awt.Graphics g)
           
 boolean isCritical()
           
 
Methods inherited from class game.physics.CDynamicShape
animate, bounceOnGameRect, cycle, getVelocity
 
Methods inherited from class game.physics.CStaticShape
drawBox, getCenter, hide, intersect, isHidden, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface game.graphics.IGraphicObject
animate, cycle, getCenter, getVelocity, intersect
 

Constructor Detail

CMovingRect

public CMovingRect(IGameDisplay gameRect,
                   CBoundingBox boundingBox,
                   CVector2D speed,
                   java.awt.Color color)
Method Detail

draw

public void draw(java.awt.Graphics g)
Specified by:
draw in interface IGraphicObject

isCritical

public boolean isCritical()
Specified by:
isCritical in interface ICriticalObject