public Club(clubType clubtype) { object[] attr; if (clubAttributes.TryGetValue(clubtype, out attr)) { this.clubName = attr[0].ToString(); this.velocityX = System.Convert.ToSingle(attr[1]); this.expectedYards = System.Convert.ToSingle(attr[2]); } else { Debug.Log("Club Attributes not set"); // should throw exception } }
public Club(clubType clubtype){ object[] attr; if (clubAttributes.TryGetValue (clubtype, out attr)) { this.clubName = attr[0].ToString(); this.velocityX = System.Convert.ToSingle(attr[1]); this.expectedYards = System.Convert.ToSingle(attr[2]); } else { Debug.Log("Club Attributes not set"); // should throw exception } }