public static Settings Instance()
{
if (instance != null) {
return instance;
}
instance = GameComponent.Get<Settings>();
return instance;
}
}
public Animal(int weight, int range, animalType type, int weightGain) { this.weight = weight; this.range = range; this.weightGain = weightGain; this.type = type; alive = true; locationX = random.Next(0, Settings.Instance().NumbersOfAreas); locationY = random.Next(0, Settings.Instance().NumbersOfAreas); if (random.Next(1, 3) == 1) { this.gender = gender.male; } else { gender = gender.female; } }