mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 01:04:47 +02:00
Update bat.js to lazy load the pitching machine
This commit is contained in:
parent
def8294b60
commit
3cbcc6494f
1 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,11 @@
|
|||
(function() {
|
||||
Script.include("pitching.js");
|
||||
var pitchingMachine = getPitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
var pitchingMachine = null;
|
||||
this.startNearGrab = function() {
|
||||
if (!pitchingMachine) {
|
||||
getPitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
print("Started near grab!");
|
||||
pitchingMachine.start();
|
||||
MyAvatar.shouldRenderLocally = false;
|
||||
|
|
Loading…
Reference in a new issue