vooga.examples.event.demo2
Class HumanKilledbyZombieEvent

java.lang.Object
  extended by vooga.examples.event.demo2.HumanKilledbyZombieEvent
All Implemented Interfaces:
IEventHandler

public class HumanKilledbyZombieEvent
extends java.lang.Object
implements IEventHandler

Class HumanKilledbyZombieEvent implements the interface IEventHandler to create an event for the ZombieLand game.

There are two methods in HumanKilledbyZombieEvent interface. Please see actionPerformed() , isTriggered().


Constructor Summary
HumanKilledbyZombieEvent(Human human, Zombie ghost)
          Constructor.
 
Method Summary
 void actionPerformed()
          User defines what to do after event has been triggered.
 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

HumanKilledbyZombieEvent

public HumanKilledbyZombieEvent(Human human,
                                Zombie ghost)
Constructor. User can pass objects or variables through this constructor.

Parameters:
human - Human class object
ghost - Ghost class object
Method Detail

actionPerformed

public void actionPerformed()
User defines what to do after event has been triggered.

Specified by:
actionPerformed in interface IEventHandler

isTriggered

public boolean isTriggered()
User defines the condition when the event will be triggered

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