Ejemplo n.º 1
1
 protected Animal(string name, int age, AnimalSex sex)
 {
     this.Name = name;
     this.Age = age;
     this.Sex = sex;
 }
Ejemplo n.º 2
1
 public Kitten(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
     if (sex != AnimalSex.female)
     {
         throw new ArgumentException("Kittens must be female");
     }
 }
Ejemplo n.º 3
0
 public Tomcat(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
     if (sex != AnimalSex.male)
     {
         throw new ArgumentException("Tomcats must be male");
     }
 }
Ejemplo n.º 4
0
 public Kitten(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
     if (sex != AnimalSex.female)
     {
         throw new ArgumentException("Kittens must be female");
     }
 }
Ejemplo n.º 5
0
 public AnimalBehaviourComponent(Entity parent, AnimalSex sex, AnimalDiet diet, int foodChainLevel,
                                 int breedability, string presetName, float oxygenConsumption, float co2Production, int foodDrop, float birthDrop) : base(parent)
 {
     this.Sex               = sex;
     this.Diet              = diet;
     this.FoodChainLevel    = foodChainLevel;
     this.PresetName        = presetName;
     this.Breedability      = breedability;
     this.Satiated          = 80.0f;
     this.oxygenConsumption = oxygenConsumption;
     this.co2Production     = co2Production;
     this.FoodDrop          = foodDrop;
     this.BirthDrop         = birthDrop;
 }
Ejemplo n.º 6
0
 public Dog(string name, int age, AnimalSex sex)
     : base(name, age, sex)
 {
     this.Sound = "I'm a dog. Wuff Wuff !";
 }
Ejemplo n.º 7
0
 //constructor
 public Cat(int age, string name, AnimalSex sex)
     : base(age, name, sex)
 {
 }
Ejemplo n.º 8
0
 //constructor
 public Animal(int age, string name, AnimalSex sex)
 {
     this.age = age;
         this.name = name;
         this.sex = sex;
 }
Ejemplo n.º 9
0
 public Frog(string name, int age, AnimalSex sex)
     : base(name, age, sex)
 {
     this.Sound = "I'm a frog. Rubbut Rubbut !";
 }
Ejemplo n.º 10
0
 public Cat(string name, int age, AnimalSex sex)
     : base(name, age, sex)
 {
 }
Ejemplo n.º 11
0
 public Animal(string name, AnimalSex sex, int age)
 {
     this.name = name;
     this.sex  = sex;
     this.age  = age;
 }
Ejemplo n.º 12
0
 public Cat(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
 }
Ejemplo n.º 13
0
 public Dog(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
 }
Ejemplo n.º 14
0
 public Animal(string name, AnimalSex sex, int age)
 {
     this.name = name;
     this.sex = sex;
     this.age = age;
 }
Ejemplo n.º 15
0
 public Tomcat(string name, AnimalSex sex, int age)
     : base(name, sex, age)
 {
     if (sex != AnimalSex.male)
     {
         throw new ArgumentException("Tomcats must be male");
     }
 }