Ejemplo n.º 1
0
        private void ReplaceValidHumanSkill(InputEntity entity, bool isValid, InputHumanSkillState skill)
        {
            int code = 0;

            if (skill != null)
            {
                code = skill.SkillCode;
            }

            if (!isValid)
            {
                isValid = JudgeLength(code);
            }

            if (!isValid)
            {
                code = _contexts.service
                       .gameServiceSkillCodeService.SkillCodeService
                       .GetCurrentSkillCode(entity.gameInputButton.InputButton, code);
            }

            if (isValid)
            {
                ITimerService timerService = _contexts.service.gameServiceTimerService.TimerService;
                timerService.StopTimer(timerService.GeTimer(TimerId.JUDGE_SKILL_TIMER), false);
            }

            _contexts.input.ReplaceGameInputHumanSkillState(isValid, code);
        }