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);
        }
 public IActionResult ProccessXML(object someXMLObject)
 {
     SomeMethodWithXml(someXMLObject)
     //Reset Timer
     _timerService.StopTimer();
     _timerService.StartTimer();
     return(Ok());
 }
Ejemplo n.º 3
0
 public override void Exit()
 {
     base.Exit();
     if (_timer != null)
     {
         _timerService.StopTimer(_timer, false);
     }
 }
Ejemplo n.º 4
0
    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        _timerService.StopTimer(_timer, false);
    }