/// <summary> /// Sets everything back to its initial value to rethrow the pitch /// </summary> void rethrowpitch() { ball.transform.position = hand.transform.position; x = 0; contin = false; trail.Clear(); collideBat = false; RB.useGravity = false; //resets the ball physics for next pitch RB.velocity = Vector3.zero; trail.enabled = false; hit = false; i = 0; shiftback(); //sets paths and quadrent equal to the new random values of the next pitch Paths = stats.getPitchType(); quadrent = stats.setQuadrent(); num = pathArray[Paths].childCount; path = new Transform[num]; for (int j = 0; j < num; j++) { path[j] = pathArray[Paths].GetChild(j); } shift(); }
/// <summary> /// Hard speed of 20 /// Pitcher Areitta J /// </summary> void ChangespeedH() { //sets stats equal to Arietta J's stats and sets the pitch and quadrent equal to a new random one stats = GameObject.Find("CSV").GetComponent <StatsScript>() as StatsScript; Paths = stats.getPitchType(); quadrent = stats.setQuadrent(); speed = 20; }