Exemplo n.º 1
0
        public void Initializate()
        {
            _buttons = SIC <ComputerButton> .ComponentsDown(transform);

            if (_buttons == null || _buttons.Length == 0)
            {
                throw new System.Exception("Пустое поле _buttons");
            }
        }
Exemplo n.º 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;
            }
            }
        }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
 public void Initializate()
 {
     _classes = SIC <ClassAgent> .ComponentsDown(transform).OrderBy(x => x.gameObject.name).ToArray();
 }