moagg.game.control.handler
Class GravityUpdateHandler

java.lang.Object
  extended by moagg.game.control.handler.GravityUpdateHandler
All Implemented Interfaces:
GameControlHandler

public class GravityUpdateHandler
extends java.lang.Object
implements GameControlHandler

Takes care of updating the level's gravity matrix if e.g. magnets are switched on or off.


Constructor Summary
GravityUpdateHandler()
           
 
Method Summary
protected  java.lang.Boolean getActivationTransition(ActivatableObject activatable)
           
protected  Rectangle getGravityRectangle(Magnet magnet)
           
protected  Vector getGravityVector(Magnet magnet)
           
 void update(InternalGameControl gameControl, long elapsedTime)
           
protected  void updateBlackHole(Blackhole blackHole, InternalGameControl gameControl, long elapsedTime)
           
protected  void updateMagnet(Magnet magnet, InternalGameControl gameControl, long elapsedTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GravityUpdateHandler

public GravityUpdateHandler()
Method Detail

update

public void update(InternalGameControl gameControl,
                   long elapsedTime)
Specified by:
update in interface GameControlHandler

updateMagnet

protected void updateMagnet(Magnet magnet,
                            InternalGameControl gameControl,
                            long elapsedTime)

updateBlackHole

protected void updateBlackHole(Blackhole blackHole,
                               InternalGameControl gameControl,
                               long elapsedTime)

getActivationTransition

protected java.lang.Boolean getActivationTransition(ActivatableObject activatable)

getGravityRectangle

protected Rectangle getGravityRectangle(Magnet magnet)

getGravityVector

protected Vector getGravityVector(Magnet magnet)


Copyright © 2008. All Rights Reserved.