entity call params

This commit is contained in:
James Pollack 2015-11-05 14:24:21 -08:00
parent 751d51ee72
commit b229b5289c
2 changed files with 8 additions and 2 deletions

View file

@ -217,6 +217,13 @@ void EntityScriptingInterface::deleteEntity(QUuid id) {
}
}
void EntityScriptingInterface::callEntityMethod(QUuid id, const QString& method) {
if (_entitiesScriptEngine) {
EntityItemID entityID{ id };
_entitiesScriptEngine->callEntityScriptMethod(entityID, method);
}
}
void EntityScriptingInterface::callEntityMethod(QUuid id, const QString& method, const QStringList& params) {
if (_entitiesScriptEngine) {
EntityItemID entityID{ id };
@ -224,7 +231,6 @@ void EntityScriptingInterface::callEntityMethod(QUuid id, const QString& method,
}
}
QUuid EntityScriptingInterface::findClosestEntity(const glm::vec3& center, float radius) const {
EntityItemID result;
if (_entityTree) {

View file

@ -94,7 +94,7 @@ public slots:
/// engine. If the entity does not have an entity script or the method does not exist, this call will have
/// no effect.
Q_INVOKABLE void callEntityMethod(QUuid entityID, const QString& method);
Q_INVOKABLE void callEntityMethod(QUuid entityID, const QString& method, const QStringList& params);
/// finds the closest model to the center point, within the radius
/// will return a EntityItemID.isKnownID = false if no models are in the radius
/// this function will not find any models in script engine contexts which don't have access to models