mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
entity call params
This commit is contained in:
parent
751d51ee72
commit
b229b5289c
2 changed files with 8 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue