public void Receive(int weaponId, int configIndex, SkillPhaseType type, float focoPercentage, int ret) { //Debug("Receive:" + type); ChangeState(configIndex, type); if (type == SkillPhaseType.SKILL_END) { Clear(); //Debug("=============Clear+++++++++++++++++"); } }
private bool CheckRequest(SkillPhaseType type) { bool result = true; if (_skill.IsActive) { result = (type != SkillPhaseType.START); } else { result = (type != SkillPhaseType.SKILL_END); } return(result); }
private void ChangeState(int configIndex, SkillPhaseType phaseType) { if (phaseType < SkillPhaseType.INITIAL_PHASE || phaseType > SkillPhaseType.NONE) { return; } if (_lastConfigIndex != configIndex) { _lastConfigIndex = configIndex; NextAct(false); } int intValue = (int)phaseType; UpdateEnvironment(); SkillPhaseState state = GetPhaseState(configIndex, (SkillConfigSkillPhaseType)intValue); bool result = _hsmStateMachine.StateMachineTransition.ChangeDestinationNode(state); //Debug("++++++++++++++++ ChangeNode:" + _skill.weaponId + " configIndex:" + configIndex + " phaseType:" + phaseType + " nodeId:" + state.NodeId + " " + result + " time:" + Extend.GameUtils.GetMillisecond()); }