vooga.games.zombieland.events
Class AddRandomItemEvent

java.lang.Object
  extended by vooga.games.zombieland.events.AddRandomItemEvent
All Implemented Interfaces:
IEventHandler

public class AddRandomItemEvent
extends java.lang.Object
implements IEventHandler


Constructor Summary
AddRandomItemEvent(PlayField playField, Shooter human, SpriteGroup items)
           
 
Method Summary
 void actionPerformed()
          User defines what to do after event has been triggered.
 void addRandomItem(double x, double y)
          Spawn a random item at position (x,y)
 boolean isTriggered()
          User defines the condition when the event will be triggered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddRandomItemEvent

public AddRandomItemEvent(PlayField playField,
                          Shooter human,
                          SpriteGroup items)
Method Detail

isTriggered

public boolean isTriggered()
Description copied from interface: IEventHandler
User defines the condition when the event will be triggered

Specified by:
isTriggered in interface IEventHandler
Returns:
true iff the fire condition is satisfied

actionPerformed

public void actionPerformed()
Description copied from interface: IEventHandler
User defines what to do after event has been triggered.

Specified by:
actionPerformed in interface IEventHandler

addRandomItem

public void addRandomItem(double x,
                          double y)
Spawn a random item at position (x,y)

Parameters:
x - x coordinate
y - y coordinate