Beispiel #1
0
        public LessonBrowser()
        {
            LessonData lessonData = LessonAccess.Instance.CurrentLessonData;

            m_LessonStageFactory = lessonData.LessonStageFactory;

            if (m_LessonStageFactory.LessonStages.Count > 0)
            {
                m_DefaultActiveState = false;
                ApplyDefaultState(lessonData.ShapeDataFactory);

                LessonStage firstStage = m_LessonStageFactory.LessonStages[0];
                m_AppliedActions.Push(firstStage);
                firstStage.ApplyActions();

                HandleLessonStageNumberChanged(LessonAccess.Instance.CurrentLessonStageNumber);
            }
            else
            {
                m_DefaultActiveState = true;
                ApplyDefaultState(lessonData.ShapeDataFactory);
            }

            AddDisposable(EventBus.Subscribe(this));
        }
Beispiel #2
0
        public LessonData()
        {
            m_ShapeDataFactory      = new ShapeDataFactory();
            m_ShapeBlueprintFactory = new ShapeBlueprintFactory(m_ShapeDataFactory);

            m_ShapeActionFactory = new ShapeActionFactory(m_ShapeDataFactory);
            m_LessonStageFactory = new LessonStageFactory(m_ShapeActionFactory);

            OnDeserialized();
        }
Beispiel #3
0
 public void OnTargetChosen(LessonStageFactory stagesFactory)
 {
     m_LessonStageFactory = stagesFactory;
     UpdateCanvas();
 }