mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Rename getPitchingMachine to getOrCreatePitchingMachine
This commit is contained in:
parent
30841169ee
commit
20bdc7ee85
2 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
this.startNearGrab = function() {
|
||||
print("Started near grab!");
|
||||
if (!pitchingMachine) {
|
||||
pitchingMachine = getPitchingMachine();
|
||||
pitchingMachine = getOrCreatePitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
pitchingMachine.start();
|
||||
|
@ -12,7 +12,7 @@
|
|||
};
|
||||
this.continueNearGrab = function() {
|
||||
if (!pitchingMachine) {
|
||||
pitchingMachine = getPitchingMachine();
|
||||
pitchingMachine = getOrCreatePitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
pitchingMachine.start();
|
||||
|
|
|
@ -80,14 +80,14 @@ var PITCHING_MACHINE_PROPERTIES = {
|
|||
z: 0.39
|
||||
},
|
||||
collisionsWillMove: false,
|
||||
shapeType: "Box",
|
||||
shapeType: "Box"
|
||||
};
|
||||
PITCHING_MACHINE_PROPERTIES.dimensions = Vec3.multiply(2.5, PITCHING_MACHINE_PROPERTIES.dimensions);
|
||||
var DISTANCE_FROM_PLATE = PITCHING_MACHINE_PROPERTIES.position.z;
|
||||
|
||||
var PITCH_RATE = 5000;
|
||||
|
||||
getPitchingMachine = function() {
|
||||
getOrCreatePitchingMachine = function() {
|
||||
// Search for pitching machine
|
||||
var entities = findEntities({ name: PITCHING_MACHINE_PROPERTIES.name }, 1000);
|
||||
var pitchingMachineID = null;
|
||||
|
|
Loading…
Reference in a new issue