overte-thingvellir/examples/baseball/bat.js
2015-11-02 12:12:21 -08:00

15 lines
509 B
JavaScript

(function() {
Script.include("file:///c:%5CUsers%5CRyan%5Cdev%5Chifi%5Cexamples%5Cbaseball%5Cpitching.js");
var pitchingMachine = getPitchingMachine();
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
this.startNearGrab = function() {
print("Started near grab!");
pitchingMachine.start();
};
this.releaseGrab = function() {
print("Stopped near grab!");
if (pitchingMachine) {
pitchingMachine.stop();
}
};
});