public static ICutting Create(HouseSpot houseSpot) { ICutting cutting; insService = new InsolationSection(); if (dbService == null) { dbService = new DBService(); } else { dbService.ResetSections(); } if (houseSpot.IsTower) { cutting = null; } else { cutting = new CuttingOrdinary(houseSpot, dbService, insService); } return(cutting); }
public CuttingOrdinary(HouseSpot houseSpot, IDBService dbService, IInsolation insService) { this.houseSpot = houseSpot; this.dbService = dbService; this.insService = insService; // Определение шагов секций SectionSteps = GetSectionSteps(); }
public void GenerateHouseSpot(GameObject house) { HouseSpot spot = house.GetComponent <HouseSpot>(); if (spot != null) { Destroy(spot); if (house.transform.GetChild(0).name.IndexOf(housePointPrefab.name) != -1) { Destroy(house.transform.GetChild(0).gameObject); } } spot = house.AddComponent <HouseSpot>(); spot.requests = GenerateRandomResourceTypes(); GameObject pref = Instantiate(housePointPrefab, house.transform, false); }
/// <summary> /// Визуализация пятна дома /// </summary> private void VisualSpot(HouseSpot spot) { var firstSegment = spot.Segments.First(); VisualSegmentDirection(firstSegment, spot.SpotName); }