|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.skills.PixieSkills
Implements the "fly" and "land" commands.
Constructor Summary | |
PixieSkills()
|
Method Summary | |
java.lang.Object |
createClone()
Produces a clone of the property for the caller. |
CommandEvent |
createEvent(CommandEvent e)
Creates a CommandEvent that encapsulates all the state necessary to perform the command. |
boolean |
equals(java.lang.Object o)
|
boolean |
execute(CommandEvent e)
Executes the specified CommandEvent. |
boolean |
fly(CommandEvent e)
|
int |
hashCode()
|
boolean |
knowsCommand(java.lang.String cmd)
Returns true if this Command wants to handle the command. |
boolean |
land(CommandEvent e)
|
void |
notifyAdd(PropertyList obj)
Notifies the property that it's being added to a PropertyList. |
void |
notifyRemove(PropertyList obj)
Notifies the property that it's being removed from a PropertyList. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PixieSkills()
Method Detail |
public void notifyAdd(PropertyList obj)
AddRemoveNotify
You should never assume that the passed value is a GameObject. Make sure to test it with instanceof (Java) or isInstance (Jython) first. Properties are added to Archetypes as well as GameObjects, so your AddRemoveNotify is likely to be called for both cases.
notifyAdd
in interface AddRemoveNotify
obj
- the PropertyList whose property list we're being
added topublic void notifyRemove(PropertyList obj)
AddRemoveNotify
You should never assume that the passed value is a GameObject. Make sure to test it with instanceof (Java) or isInstance (Jython) first. Properties are added to Archetypes as well as GameObjects, so your AddRemoveNotify is likely to be called for both cases.
notifyRemove
in interface AddRemoveNotify
obj
- the PropertyList we're being removed frompublic boolean knowsCommand(java.lang.String cmd)
Command
This method exists to allow more than one game object to implement the same command verb, but with different expected arguments.
If two objects register for the same command and the same arguments, the object that was registered most recently gets to handle at the command.
knowsCommand
in interface Command
cmd
- the entire command string, including arguments
public CommandEvent createEvent(CommandEvent e)
Command
This method is called by the kernel. The kernel passes the event to the pre-hook, then calls Command.execute() (below) to execute the event, and finally calls the post-hook.
createEvent
in interface Command
e
- a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent e)
Command
execute
in interface Command
e
- the CommandEvent to execute
public boolean fly(CommandEvent e)
public boolean land(CommandEvent e)
public java.lang.Object createClone()
MutableProperty
createClone
in interface MutableProperty
public boolean equals(java.lang.Object o)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |