Exemple #1
0
 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+++++++++++++++++");
     }
 }
Exemple #2
0
    private bool CheckRequest(SkillPhaseType type)
    {
        bool result = true;

        if (_skill.IsActive)
        {
            result = (type != SkillPhaseType.START);
        }
        else
        {
            result = (type != SkillPhaseType.SKILL_END);
        }
        return(result);
    }
Exemple #3
0
    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());
    }