Prevent this name implementation to appear in radar mode

This commit is contained in:
Cristian Luis Duarte 2018-05-11 21:58:12 -03:00
parent 9e9e1092d6
commit 3fd8a02375
2 changed files with 15 additions and 4 deletions
scripts/system/+android

View file

@ -124,6 +124,10 @@ function touchEnd(event) {
currentTouchToAnalyze = null;
}
function excludeMyAvatar() {
rayExclusionList = [MyAvatar.sessionUUID];
}
function ending() {
Controller.touchBeginEvent.disconnect(touchBegin);
Controller.touchEndEvent.disconnect(touchEnd);
@ -137,6 +141,8 @@ function ending() {
if (currentlyShownAvatar.avatar) {
currentlyShownAvatar.avatar = null;
}
MyAvatar.sessionUUIDChanged.disconnect(excludeMyAvatar);
}
function init() {
@ -150,11 +156,14 @@ function init() {
});
rayExclusionList = [MyAvatar.sessionUUID];
MyAvatar.sessionUUIDChanged.connect(function() {
rayExclusionList = [MyAvatar.sessionUUID];
});
MyAvatar.sessionUUIDChanged.connect(excludeMyAvatar);
}
init();
module.exports = {
init: init,
ending: ending
}
//init(); // Enable to use in desktop as a standalone
}()); // END LOCAL_SCOPE

View file

@ -88,8 +88,10 @@ function switchToMode(newMode) {
if (currentMode == MODE_RADAR) {
radar.startRadarMode();
displayNames.ending();
} else if (currentMode == MODE_MY_VIEW) {
// nothing to do yet
displayNames.init();
} else {
printd("Unknown view mode " + currentMode);
}