Esempio n. 1
0
    public IEnumerator UpdateSchedule()
    {
        List <SchedulePoint> cache = new List <SchedulePoint>(_schedulePoints);

        _schedulePoints.Clear();

        for (int i = 0; i < cache.Count; i++)
        {
            SchedulePoint point = new SchedulePoint()
            {
                PointPosition = GetVacantPosition(),
                Customer      = cache[i].Customer
            };

            _schedulePoints.Add(point);
        }

        for (int i = 0; i < _schedulePoints.Count; i++)
        {
            var point = _schedulePoints[i];
            point.Customer.MoveTo(point.PointPosition, point.Customer.transform.rotation.eulerAngles, 1);

            yield return(new WaitForSeconds(0.2f));
        }
    }
Esempio n. 2
0
    private void AddSchedulePoint(Customer data)
    {
        var position = GetVacantPosition();

        var point = new SchedulePoint
        {
            PointPosition = position,
            Customer      = data
        };

        data.transform.position = point.PointPosition;

        _schedulePoints.Add(point);
    }
Esempio n. 3
0
        /// <summary>
        /// Add Schedule control point info
        /// </summary>
        /// <param name="schedule">Schedule Point</param>
        /// <param name="index">Index</param>
        public void Add(SchedulePoint schedule, int index)
        {
            try
            {
                ControlPointInfo newCPInfo = new ControlPointInfo
                {
                    ControlPointName = "SCH" + index,
                    Label            = schedule.Label,
                    FullLabel        = schedule.Description,
                    Type             = IdentifierTypes.SCHS,
                    Value            = "",
                    Units            = "",
                    AutoManual       = schedule.AutoManual == 0 ? "Auto" : "Manual",
                    Index            = (short)index
                };

                Schedules.Add(newCPInfo);
            }
            catch (Exception ex)
            {
                ExceptionHandler.Show(ex, "Addition of new Schedule to ControlPointsInfo");
            }
        }