Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
    }
Ejemplo n.º 4
0
        /// <summary>
        /// Визуализация пятна дома
        /// </summary>
        private void VisualSpot(HouseSpot spot)
        {
            var firstSegment = spot.Segments.First();

            VisualSegmentDirection(firstSegment, spot.SpotName);
        }