//trajectory mapping public void PlotTrajectory(Vector3 start, Vector3 velocity, Shot.ShotParams shotParams) { if (Vector3.Distance (velocity, lastVelocity) > redrawThreshhold) { lastVelocity = velocity; trajectory.SetPosition(0, start); trajectory.SetPosition(1, start + (velocity * directionIndecatorLengthMultiplier)); if(velocity.y > 0) { trajectory.SetColors (shotParams.GetColor(), shotParams.GetColor()); } else { hideTrajectory(); } } }
private void SetBallVisuals(int index, Shot.ShotParams param) { balls[2].GetComponent<Image>().color = param.GetColor(); }