Ejemplo n.º 1
0
 public Human(string _name)
 {
     name        = _name;
     hunger      = new DepletableObject(MAX_hunger, MAX_hunger, hunger_gain, hunger_drain, true);
     thirst      = new DepletableObject(MAX_thirst, MAX_thirst, thirst_gain, thirst_drain, true);
     health      = new DepletableObject(MAX_health, MAX_health, health_gain, health_drain, true);
     role        = HumanRole.resident;
     isInPrison  = false;
     isAlive     = true;
     isAliveSync = new object();
 }
Ejemplo n.º 2
0
        public Human()
        {
            List <string> rnd_names = new List <string>(new string[] { "John", "Jack", "Emily", "Janet" });
            Random        rnd       = new Random();

            name        = rnd_names[rnd.Next(rnd_names.Count)];
            hunger      = new DepletableObject(MAX_hunger, MAX_hunger, hunger_gain, hunger_drain, true);
            thirst      = new DepletableObject(MAX_thirst, MAX_thirst, thirst_gain, thirst_drain, true);
            health      = new DepletableObject(MAX_health, MAX_health, health_gain, health_drain, true);
            role        = HumanRole.resident;
            isInPrison  = false;
            isAlive     = true;
            isAliveSync = new object();
        }
Ejemplo n.º 3
0
 public Well(int _water_gain, int _MAX_water)
 {
     water       = new DepletableObject(_MAX_water, _MAX_water / 2, _water_gain, 0);
     isAvailable = true;
     isAvSync    = new object();
 }
Ejemplo n.º 4
0
 public Well()
 {
     water       = new DepletableObject(default_MAX_water, default_MAX_water / 2, default_water_gain, 0);
     isAvailable = true;
     isAvSync    = new object();
 }
Ejemplo n.º 5
0
 public DonjonTower(int food_cap, int water_cap)
 {
     food                = new DepletableObject(default_food_cap, default_food_cap, food_gain, 0);
     isUnderAttack       = false;
     isUnderAttackObject = new object();
 }