mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 07:10:06 +02:00
Add logging of show/hide/getByName in tutorial
This commit is contained in:
parent
d9e6491843
commit
1f2b555a26
1 changed files with 11 additions and 1 deletions
|
@ -937,6 +937,10 @@ stepCleanupFinish.prototype = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function isEntityInLocalTree(entityID) {
|
||||||
|
return Entities.getEntityProperties(entityID, 'visible').visible !== undefined;
|
||||||
|
}
|
||||||
|
|
||||||
function showEntitiesWithTag(tag) {
|
function showEntitiesWithTag(tag) {
|
||||||
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
||||||
if (entities) {
|
if (entities) {
|
||||||
|
@ -955,6 +959,7 @@ function showEntitiesWithTag(tag) {
|
||||||
collisionless: collisionless,
|
collisionless: collisionless,
|
||||||
userData: JSON.stringify(data),
|
userData: JSON.stringify(data),
|
||||||
};
|
};
|
||||||
|
debug("Showing: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||||
Entities.editEntity(entityID, newProperties);
|
Entities.editEntity(entityID, newProperties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -979,6 +984,7 @@ function showEntitiesWithTag(tag) {
|
||||||
Entities.editEntity(entityID, newProperties);
|
Entities.editEntity(entityID, newProperties);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideEntitiesWithTag(tag) {
|
function hideEntitiesWithTag(tag) {
|
||||||
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
var entities = TUTORIAL_TAG_TO_ENTITY_IDS_MAP[tag];
|
||||||
if (entities) {
|
if (entities) {
|
||||||
|
@ -994,6 +1000,8 @@ function hideEntitiesWithTag(tag) {
|
||||||
ignoreForCollisions: 1,
|
ignoreForCollisions: 1,
|
||||||
userData: JSON.stringify(data),
|
userData: JSON.stringify(data),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
debug("Hiding: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||||
Entities.editEntity(entityID, newProperties);
|
Entities.editEntity(entityID, newProperties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1028,9 @@ function hideEntitiesWithTag(tag) {
|
||||||
// cached list of entities. Otherwise, return undefined.
|
// cached list of entities. Otherwise, return undefined.
|
||||||
function getEntityWithName(name) {
|
function getEntityWithName(name) {
|
||||||
debug("Getting entity with name:", name);
|
debug("Getting entity with name:", name);
|
||||||
return TUTORIAL_NAME_TO_ENTITY_PROPERTIES_MAP[name];
|
var entityID = TUTORIAL_NAME_TO_ENTITY_PROPERTIES_MAP[name];
|
||||||
|
debug("Entity id: ", entityID, ", Is in local tree: ", isEntityInLocalTree(entityID));
|
||||||
|
return entityID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue