Exemplo n.º 1
0
 /// <summary>
 /// Constructor to initialise the food type and the HPIncrease.
 /// </summary>
 /// <param name="typefood">Foodtype we want the food to be.</param>
 public Food(TypesOfFood typefood)
 {
     // Set Property as the type of food we want
     FoodType = typefood;
     // Call Method to Set the HPIncrease for each type of food
     SetHp();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor to initialise the food type and the HPIncrease.
 /// </summary>
 public Food()
 {
     // Food Type is Random between all types of food that exist
     FoodType = (TypesOfFood)
                rnd.Next(Enum.GetNames(typeof(TypesOfFood)).Length);
     // Call Method to Set the HPIncrease for each type of food
     SetHp();
 }