Пример #1
0
        /// <summary>
        /// класс элемента курса
        /// кадр
        /// </summary>
        /// <param name="_item">кадр темы</param>
        /// <param name="_absPathByThis">абсолютный путь до папки кадра
        /// не включает в себя часть пути самого кадра (тэг picture)</param>
        /// <exception cref="ArgumentNullException"></exception>
        public ItemStepModel(LearningStep _item, string _absPathByThis)
        {
            if (_item == null || string.IsNullOrEmpty(_absPathByThis))
            {
                throw new ArgumentNullException("Отсутствие информации о кадре темы");
            }


            try
            {
                item      = _item;
                Title     = _item.title;
                PathToPic = Path.GetDirectoryName(_item.picture);
                PicName   = Path.GetFileName(_item.picture);

                Text = ConvertByteToHTMLString(_item.text);

                OriginFullPicPath = Path.Combine(_absPathByThis.AsPath(), _item.picture);
                Warning           = new StepMarkModel(_item.warningFlag, _item.warningText);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Пример #2
0
    public void Reset()
    {
        failLaunch         = false;
        CanProcessNextStep = true;
        sliderLockOut      = false;
        popup.Reset();
        HideGizmoAndWidgets();

        if (activeCoroutine != null)
        {
            StopCoroutine(activeCoroutine);
        }

        foreach (GameObject marker in markers)
        {
            Destroy(marker);
        }
        markers.Clear();
        currentStep = LearningStep.NotStarted;
        midAirStep  = MidAirStep.Undefined;

        foreach (ArrowIndicator arrow in vectorArrows)
        {
            Destroy(arrow.gameObject);
        }
        vectorArrows.Clear();

        // Reset Camera view transform
        mainCam.transform.position = catapult.startCamTransform.position;
        mainCam.transform.rotation = catapult.startCamTransform.rotation;

        catapult.Reset();
        cannonBall.Reset();
        cubeWall.Reset();
    }