// Use this for initialization void Start() { GoalLocalY = transform.localPosition.y; List <float> vals = new List <float>(new float[] { Mathf.Abs(transform.localPosition.x), Mathf.Abs(transform.localPosition.y), Mathf.Abs(transform.localPosition.z) }); vals.Sort(); vals.Reverse(); moves = Mathf.Abs(Mathf.RoundToInt(vals[0] - vals[1])); //Debug.Log(moves + "-" + vals[0] + "-" + vals[1] + "-" + vals[2]); SB = GetComponentInParent <StatBlock>(); DistancePerMove = transform.localPosition.y / (SB.Width + 1); localDepth = (SB.Width + 1) / 2f; PointsUsable = SB.GetComponent <AvailablePts>(); PointsEarned = SB.GetComponent <EarnedPts>(); Sfx = GetComponent <AudioSource>(); }