Пример #1
0
 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
     }
 }
Пример #2
0
	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
				} 
	
		}