org.starhope.appius.game.npc
Class BraqueNonPlayerCharacter
java.lang.Object
org.starhope.appius.game.npc.BraqueNonPlayerCharacter
- Direct Known Subclasses:
- PythonNPC
public abstract class BraqueNonPlayerCharacter
- extends Object
- Author:
- brpocock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
BraqueNonPlayerCharacter
public BraqueNonPlayerCharacter()
getScriptedNPC
public static NPCInterface getScriptedNPC(String engine,
String script,
String klass)
throws NotFoundException,
FileNotFoundException
- This instantiates an NPC based upon a script from ... somewhere.
The script engine responsible for interpreting the script must be
specified, along with the name of the script. How the name is
interpreted varies depending on the script engine, but generally,
it's going to be an instance of a BraqueNonPlayerCharacter-
derived class object in whatever language environment that is.
- Parameters:
engine
- This the identifier for the script engine. The
supported engines are a hard-coded list in the source
code. Currently, there are plans for (but not necessarily
working support for) the following language engines: (all
of these are all-lower-case identifier strings for
uniformity): perl, lua, ruby, ecmascript, python, javascript
- This is the NPC class/script to be instantiated. In
Perl, this will be a class name of the form
Some::Class::Name. In Java, it will be something like
com.tootsville.game.items.Something. Each language has its
own conventions as to what is allowed.klass
- WRITEME
- Returns:
- A BraqueNonPlayerCharacter instance.
- Throws:
NotFoundException
- If the script engine can't be
found/recognized/initialized
FileNotFoundException
- If the script itself can't be found