Ejemplo n.º 1
0
        public void OnEvent(WorkflowLoadArgs arg)
        {
            m_CurrentBadges = BadgeData.Empty;
            int repetitionAmount = 0;
            int stepAmount       = 0;

            foreach (WorkflowStepData stepData in m_WorkflowService.currentWorkflowData.steps)
            {
                repetitionAmount = stepData.repetitions < repetitionAmount ? repetitionAmount : stepData.repetitions;
                if (stepData.repetitions > 0 && !stepData.automatic)
                {
                    ++stepAmount;
                }
            }
            ++repetitionAmount;
            m_AmountLevels = new int[] { Mathf.FloorToInt(repetitionAmount * 0.5f),
                                         Mathf.FloorToInt(repetitionAmount * 0.75f),
                                         repetitionAmount };
            m_FastLevels = new int[] { 0, Mathf.FloorToInt(stepAmount * 0.5f), stepAmount };
            //TODO: move this to a workflow configuration
            m_StreakLevels = new int[] { Mathf.FloorToInt(stepAmount * repetitionAmount * 0.5f),
                                         Mathf.FloorToInt(stepAmount * repetitionAmount * 0.75f),
                                         stepAmount *repetitionAmount };

            m_StreakCounter   = 0;
            m_FastCounter     = 0;
            m_PrevRepetitions = 0;
        }
 public void OnEvent(WorkflowLoadArgs args)
 {
     SendEventToBot(clientReadyForWorkflow, args.msg);
 }