示例#1
0
 public ComplaintAlert(Game1 game, Apartment apartment, int X, Apartment toApartment) : base(game, apartment, X, toApartment)
 {
 }
示例#2
0
        private void BuildBuilding()
        {
            if (stopBuilding)
            {
                return;
            }

            if (buildingWidth > BUILDINGSIZE || buildingHeight > BUILDINGSIZE)
            {
                stopBuilding = true;
                return;
            }

            numApartments++;

            if (numApartments == 5 * rentMilestone)
            {
                AddAlert(new RentIncreaseAlert(this, null, alertX));
            }

            if (buildingWidth > buildingHeight)
            {
                for (int i = 0; i < buildingHeight; i++)
                {
                    if (apartments[buildingWidth - 1, i] == null)
                    {
                        apartments[buildingWidth - 1, i] = new Apartment(
                            new Vector2((buildingWidth - 1) * Apartment.width, -1 * i * Apartment.height),
                            new Point(buildingWidth - 1, i),
                            calendar
                            );
                        return;
                    }
                }
                //If not returned, we need to swivel
                buildingHeight++;
                if (buildingHeight <= BUILDINGSIZE)
                {
                    apartments[0, buildingHeight - 1] = new Apartment(
                        new Vector2(0, -1 * (buildingHeight - 1) * Apartment.height),
                        new Point(0, buildingHeight - 1),
                        calendar
                        );
                }
            }
            else
            {
                for (int i = 0; i < buildingWidth; i++)
                {
                    if (apartments[i, buildingHeight - 1] == null)
                    {
                        apartments[i, buildingHeight - 1] = new Apartment(
                            new Vector2(i * Apartment.width, -1 * (buildingHeight - 1) * Apartment.height),
                            new Point(i, buildingHeight - 1),
                            calendar
                            );
                        return;
                    }
                }
                //If not returned, we need to swivel
                buildingWidth++;
                if (buildingWidth <= BUILDINGSIZE)
                {
                    apartments[buildingWidth - 1, 0] = new Apartment(
                        new Vector2((buildingWidth - 1) * Apartment.width, 0),
                        new Point(buildingWidth - 1, 0),
                        calendar
                        );
                }
            }
        }
示例#3
0
 public MoveInAlert(Game1 Game, Apartment apartment, int X) : base(Game, apartment, X)
 {
 }
示例#4
0
 public TutorialAlert1(Game1 Game, Apartment apartment, int X) : base(Game, apartment, X)
 {
 }
 public RentIncreaseAlert(Game1 Game, Apartment apartment, int X) : base(Game, apartment, X)
 {
 }
示例#6
0
 public RepairAlert(Game1 Game, Apartment apartment, int X) : base(Game, apartment, X)
 {
 }
示例#7
0
 public static bool Occupied(Apartment apartment)
 {
     return(apartment != null && apartment.IsOccupied);
 }
示例#8
0
 public MoveOutAlert(Game1 game, Apartment apartment, int X) : base(game, apartment, X, null)
 {
 }