feud.testgame.view
Class LevelEntityListener

java.lang.Object
  extended byfeud.testgame.view.LevelEntityListener
All Implemented Interfaces:
com.threed.jpct.CollisionListener

public class LevelEntityListener
extends java.lang.Object
implements com.threed.jpct.CollisionListener

A collision listener that listens if a something has hit the level structure. In this example, this is limited to bullets and used for drawing decals.


Constructor Summary
LevelEntityListener(DecalManager decalMan)
          Creates a new listener.
 
Method Summary
 void collision(com.threed.jpct.CollisionEvent e)
          Triggered if something hits the level structure.
 boolean requiresPolygonIDs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LevelEntityListener

public LevelEntityListener(DecalManager decalMan)
Creates a new listener. The decal manager is needed for placing the decals in case of a collision event between level and bullet.

Parameters:
decalMan - the decal manager
Method Detail

requiresPolygonIDs

public boolean requiresPolygonIDs()
Specified by:
requiresPolygonIDs in interface com.threed.jpct.CollisionListener

collision

public void collision(com.threed.jpct.CollisionEvent e)
Triggered if something hits the level structure. For local bullets, a decal will be processed by the decal manager in that case.

Specified by:
collision in interface com.threed.jpct.CollisionListener
Parameters:
e - CollisionEvent