#include <Interpreter.h>
Public Member Functions | |
Interpreter () | |
Default constructor. | |
~Interpreter () | |
Destructor. | |
void | Interpret (string objectType, ObjectAgent *collisionAgent) |
Calls interpret when agent should decide next action. | |
void | Interpret (ObjectAgent *freeAgent) |
Choose next action, when agent is not in collision. | |
Private Member Functions | |
bool | method (const skString &name, skRValueArray &arguments, skRValue &returnValue, skExecutableContext &context) |
Calls script behavior handler. | |
Private Attributes | |
skInterpreter | interpreter |
Simkin interpreter. | |
ObjectAgent * | agent |
"Parsed" agent |
Interpreter::Interpreter | ( | ) | [inline] |
Default constructor.
Interpreter::~Interpreter | ( | ) | [inline] |
Destructor.
void Interpreter::Interpret | ( | ObjectAgent * | freeAgent | ) |
Choose next action, when agent is not in collision.
freeAgent | Agent, whose action is being chosen |
void Interpreter::Interpret | ( | string | objectType, | |
ObjectAgent * | collisionAgent | |||
) |
Calls interpret when agent should decide next action.
objectType | Class of object involved in the collision | |
collisionAgent | Agent, whose behavior is being interpreted |
bool Interpreter::method | ( | const skString & | name, | |
skRValueArray & | arguments, | |||
skRValue & | returnValue, | |||
skExecutableContext & | context | |||
) | [private] |
Calls script behavior handler.
name | Name of handler (in behavior script) | |
arguments | Arguments passed to called method | |
returnValue | Value returned by called method | |
context | Script context (e.g. global variables, errors) |
ObjectAgent* Interpreter::agent [private] |
"Parsed" agent
skInterpreter Interpreter::interpreter [private] |
Simkin interpreter.