Beispiel #1
0
 /// <summary>
 /// Returns -1 if the ball entered no goal hole.
 /// </summary>
 /// <param Transform="hole"></param>
 /// <returns></returns>
 public int GetGoalIndex(Transform hole)
 {
     return(!Goals.Contains(hole) ? 0 : int.Parse(hole.parent.name[hole.parent.name.Length - 1].ToString()));
 }