Пример #1
0
        public IEnumerator StartCurrentLevel()
        {
            _taskShape = StorageController.LoadShapeFromFile(_currentLevel.ToString());

            _previewWindow.ShowWindow();
            while (_previewWindow.currentState != UIWindowBase.State.rolledUp)
            {
                yield return(null);
            }
            _drawAssistant.StartDraw();


            _timerLeftRoutine = StartCoroutine(TimeLeft(_levelTime));
        }
Пример #2
0
        private void Load()
        {
            var levelNum = UICreatorController.LevelNum;

            if (string.IsNullOrEmpty(levelNum))
            {
                Debug.LogError("BAD INPUT!");
                return;
            }

            var shape = StorageController.LoadShapeFromFile(levelNum);

            DrawShape(shape);
        }
Пример #3
0
        private void Save()
        {
            var levelNum = UICreatorController.LevelNum;

            if (string.IsNullOrEmpty(levelNum))
            {
                Debug.LogError("BAD INPUT!");
                return;
            }

            if (StorageController.HasInstance)
            {
                StorageController.SaveShapeToFile(levelNum, new Shape(_vertices));
            }
        }