public Apartment(Vector2 position, Point index, Calendar calendar, Color?color = null) { buildDate = calendar.GetDate(); this.calendar = calendar; this.position = position; this.index = index; if (color == null) { this.color = Color.Gray; } else { this.color = color.Value; } windowRect1 = new Rectangle((int)(position.X + 150), (int)(position.Y - 206), 100, 150); windowRect2 = new Rectangle((int)(position.X + 350), (int)(position.Y - 206), 100, 150); plaqueRect = new Rectangle((int)(position.X + 55), (int)(position.Y - 175), 64, 32); Vector2 plaqueSize = Game1.plaqueFont.MeasureString(ApartmentNumber); plaquePos = new Vector2(plaqueRect.X, plaqueRect.Y) + ((new Vector2(plaqueRect.Width, plaqueRect.Height) - plaqueSize) / 2); bounds = new Rectangle((int)position.X, (int)(position.Y - height), width, height); }
public void MoveIn(Tenant tenant) { Tenant = tenant; this.complaintVelocity *= tenant.TemperModifier; moveInDate = calendar.GetDate(); stopAlerts = false; complaintVelocity = DEFAULTCOMPLAINTVELOCITY; complaintOdds = DEFAULTCOMPLAINTODDS; this.color = Color.Red; }
public void MoveOut() { moveInDate = null; Tenant = null; this.color = Color.Gray; }