Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        districts = new District[districtCount];
        for (int i = 0; i < districtCount; i++)
        {
            District district = District.BuildDistrict(this, i, districtWidth, districtDepth, spacing);
            districts[i] = district;
        }

        totalWidth = districts.Length * (districtWidth + spacing) - spacing;
        center     = new Vector3(totalWidth / 2f, 0, districtDepth / 2f);
        cameraControl.transform.position = center;
        cameraControl.CalcOrthogSize(totalWidth);
    }