fix stand up icon

This commit is contained in:
ZappoMan 2014-11-20 16:08:36 -08:00
parent ee6516970e
commit 3761f24619

View file

@ -125,6 +125,17 @@
externalThis.showIndicators(false);
}
}
var globalMouseClick = function(event) {
print("globalMouseClick");
var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y});
if (clickedOverlay == externalThis.standUpButton) {
seat.model = null;
externalThis.standUp();
Controller.mousePressEvent.disconnect(globalMouseClick);
}
};
this.sitDown = function() {
sitting = true;
@ -140,6 +151,7 @@
}
Script.update.connect(sittingDownAnimation);
Overlays.editOverlay(this.standUpButton, { visible: true });
Controller.mousePressEvent.connect(globalMouseClick);
}
this.standUp = function() {