public Vector3 GetBallStartingPosition(BallIdentity identity) { Vector3 position = Vector3.zero; if (!gameBalls.TryGetValue(identity, out position)) { Debug.LogError("Strike object is missing entry for identity: " + identity.ToString()); } return(position); }
void TrackScore(BallIdentity identity, Vector3 position, float magnitude) { if (identity == BallIdentity.Yellow) { hitTracker.hitYellow = true; } if (identity == BallIdentity.Red) { hitTracker.hitRed = true; } }
public GameObject GetBall(BallIdentity identity) { return(gameBalls[identity]); }
void BallCollisionSound(BallIdentity identity, Vector3 position, float velocityMagnitude) { audioSource.transform.position = position; audioSource.volume = masterVolume.Value * velocityMagnitude; audioSource.Play(); }