예제 #1
0
 public Person(Residence house, ushort houseFloor) :
     base(house.coordinates.x, house.coordinates.y, houseFloor)
 {
     this.home    = house;
     this.routine = new Routine(house);
     ThingsPackage.add(this);
 }
예제 #2
0
 public Residence(float xCoordinate, float yCoordinate,
                  float halfWidth, float halfHeight, ushort floorsNum) :
     base(xCoordinate, yCoordinate, halfWidth, halfHeight, floorsNum)
 {
     this.setOpenStatus(true);
     ThingsPackage.add(this);
 }
예제 #3
0
 Virus(Person host) :
     base(host.coordinates)
 {
     ThingsPackage.add(this);
     host.virus = this;
     this.host  = host;
     this.setIncubation();
 }
예제 #4
0
 public Corner(float xCoordinate, float yCoordinate, float halfWidth,
               Path path = null) :
     base(xCoordinate, yCoordinate, halfWidth,
          halfWidth)
 {
     ThingsPackage.add(this);
     if (path != null)
     {
         this.endPoints = new List <Accommodable> {
             path
         }
     }
     ;
     this.makePathNodes();
 }
예제 #5
0
 public Street(float xCoordinate, float yCoordinate, float halfWidth,
               float halfHeight, ushort orientation, Path path = null) :
     base(xCoordinate, yCoordinate, halfWidth, halfHeight)
 {
     ThingsPackage.add(this);
     if (path != null)
     {
         this.endPoints = new List <Accommodable> {
             path
         }
     }
     ;
     this.orientation = orientation;
     if (this.orientation == Defs.horizontal)
     {
         this.makeNodeQuadrature = this.makeHorizontalNodeQuadrature;
     }
     else
     {
         this.makeNodeQuadrature = this.makeVerticalNodeQuadrature;
     }
     this.makePathNodes();
 }
예제 #6
0
 private void die()
 {
     ThingsPackage.remove(this);
     this.host.virus = null;
     this.host       = null;
 }
예제 #7
0
        private static void defineBuildingsCapacity()
        {
            List <Building> buildings = ThingsPackage.getBuildings();

            buildings.ForEach(building => building.definePeopleCapacity());
        }