예제 #1
0
        public void Initializate()
        {
            _buttons = SIC <ComputerButton> .ComponentsDown(transform);

            if (_buttons == null || _buttons.Length == 0)
            {
                throw new System.Exception("Пустое поле _buttons");
            }
        }
예제 #2
0
        public void Initializate()
        {
            switch (fillType)
            {
            case FillType.Hierarchy:
            {
                _class = GetComponent <ClassAgent>();
                var places = SIC <Place> .ComponentsDown(transform);

                SortPlaces(places);
                ArrayToDictionary();
                break;
            }

            case FillType.Manual:
            {
                break;
            }
            }
        }
예제 #3
0
        public void Initializate()
        {
            switch (fillType)
            {
            case FillType.Hierarchy:
            {
                _placeAgent = GetComponent <PlaceAgent>();
                _placeAgent.Initializate();

                _scholars = SIC <Scholar> .ComponentsDown(this.transform);

                var places = SIC <Place> .ComponentsDown(transform);

                SortPlaces(places);

                break;
            }

            case FillType.Manual:
            {
                break;
            }
            }

            //if (_scholars.Length != _placeAgent.Places[PlaceManager.place.Desk].Length)
            //    throw new Exception($"Количество учеников - {_scholars.Length}, Количество парт - {_placeAgent.Places[PlaceManager.place.Desk].Length}");

            if (_scholars.Length != _dockStations.Length)
            {
                throw new Exception($"Количество учеников - {_scholars.Length}, Количество Док-станций - {_dockStations.Length}");
            }

            if (_scholars.Length != _desks.Length)
            {
                throw new Exception($"Количество учеников - {_scholars.Length}, Количество Док-станций - {_desks.Length}");
            }

            ScholarInitialize();
        }
예제 #4
0
 public void Initializate()
 {
     _classes = SIC <ClassAgent> .ComponentsDown(transform).OrderBy(x => x.gameObject.name).ToArray();
 }