mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 21:53:12 +02:00
Add bat.js
This commit is contained in:
parent
72775a7af8
commit
3820adf3f6
1 changed files with 15 additions and 0 deletions
15
examples/baseball/bat.js
Normal file
15
examples/baseball/bat.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
(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();
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Reference in a new issue