mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:50:43 +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) {
|
void EntityScriptingInterface::callEntityMethod(QUuid id, const QString& method, const QStringList& params) {
|
||||||
if (_entitiesScriptEngine) {
|
if (_entitiesScriptEngine) {
|
||||||
EntityItemID entityID{ id };
|
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 {
|
QUuid EntityScriptingInterface::findClosestEntity(const glm::vec3& center, float radius) const {
|
||||||
EntityItemID result;
|
EntityItemID result;
|
||||||
if (_entityTree) {
|
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
|
/// engine. If the entity does not have an entity script or the method does not exist, this call will have
|
||||||
/// no effect.
|
/// no effect.
|
||||||
Q_INVOKABLE void callEntityMethod(QUuid entityID, const QString& method);
|
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
|
/// finds the closest model to the center point, within the radius
|
||||||
/// will return a EntityItemID.isKnownID = false if no models are in 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
|
/// this function will not find any models in script engine contexts which don't have access to models
|
||||||
|
|
Loading…
Reference in a new issue