ch.aplu.jgamegrid
Interface GGTileCollisionListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
Actor, CardActor, CardCover, GGButton, GGButtonBase, GGCheckButton, GGRadioButton, GGToggleButton, TextActor, ToolBarItem, ToolBarSeparator, ToolBarStack, ToolBarText

public interface GGTileCollisionListener
extends java.util.EventListener

Declarations of the notification method called when two actors collide.
(Cannot be used with Jython's constructor callback registration)


Method Summary
 int collide(Actor actor, Location location)
          Event callback method called when actors and tiles are colliding.
 

Method Detail

collide

int collide(Actor actor,
            Location location)
Event callback method called when actors and tiles are colliding. The collision is checked in every simulation cycle and the notification is called before the actor's act().

Parameters:
actor - the active actor the checks his collision candidates for possible collisions
location - the location of the colliding tile in the tile map (indices: 0..nbHorzTiles-1, 0..nbVertTiles-1)
Returns:
nb of simulation cycles to wait until collision is rearmed