mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 03:45:18 +02:00
Clean up bat.js
This commit is contained in:
parent
38fcdc3eff
commit
278c921a50
1 changed files with 5 additions and 12 deletions
|
@ -9,11 +9,12 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
Script.include("pitching.js");
|
||||
|
||||
(function() {
|
||||
Script.include("pitching.js");
|
||||
var pitchingMachine = null;
|
||||
this.startNearGrab = function() {
|
||||
print("Started near grab!");
|
||||
|
||||
this.startNearGrab = this.continueNearGrab = function() {
|
||||
if (!pitchingMachine) {
|
||||
pitchingMachine = getOrCreatePitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
|
@ -21,16 +22,8 @@
|
|||
pitchingMachine.start();
|
||||
MyAvatar.shouldRenderLocally = false;
|
||||
};
|
||||
this.continueNearGrab = function() {
|
||||
if (!pitchingMachine) {
|
||||
pitchingMachine = getOrCreatePitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
pitchingMachine.start();
|
||||
MyAvatar.shouldRenderLocally = false;
|
||||
}
|
||||
|
||||
this.releaseGrab = function() {
|
||||
print("Stopped near grab!");
|
||||
if (pitchingMachine) {
|
||||
pitchingMachine.stop();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue