Пример #1
0
    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);
    }
Пример #2
0
 void TrackScore(BallIdentity identity, Vector3 position, float magnitude)
 {
     if (identity == BallIdentity.Yellow)
     {
         hitTracker.hitYellow = true;
     }
     if (identity == BallIdentity.Red)
     {
         hitTracker.hitRed = true;
     }
 }
Пример #3
0
 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();
 }