feud.testgame.view
Class BulletCollisionListener

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

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

A collision listener for bullets. This listener is used to detect collisions of bullets with obstacles like walls and similar. As it does is to flag these bullets as "collided" so that they can be removed later.


Constructor Summary
BulletCollisionListener(LocalBullet bullet)
          Create a new listener.
 
Method Summary
 void collision(com.threed.jpct.CollisionEvent ce)
           
 boolean requiresPolygonIDs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulletCollisionListener

public BulletCollisionListener(LocalBullet bullet)
Create a new listener. Sadly, the listeners are working with view, not with model objects. This is why we need to give it its model object and bound it to it. Not nice but not that bad either.

Parameters:
bullet - the local bullet object that represents this bullet on the server and other clients.
Method Detail

requiresPolygonIDs

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

collision

public void collision(com.threed.jpct.CollisionEvent ce)
Specified by:
collision in interface com.threed.jpct.CollisionListener