Ejemplo n.º 1
0
    // 指向性技能输入:妲己二技能
    private AbilityInput CreateAbilityTargetInput(AbilityBehavior abilityBehavior)
    {
        var abilityInput = new AbilityInputPoint(m_casterTransform, ability);
        var trans        = GetIndicatorAsset(AbilityIndicatorType.RANGE_AREA);
        AbilityIndicatorRange abilityIndicatorRange = new AbilityIndicatorRange(trans, m_casterTransform, ability.GetCastRange());

        trans = GetIndicatorAsset(AbilityIndicatorType.SEGMENT);
        AbilityIndicatorSegment abilityIndicatorSegment = new AbilityIndicatorSegment(trans, m_casterTransform);
        var radius = ability.GetAbilityAOERadius();

        trans = GetIndicatorAsset(AbilityIndicatorType.SEGMENT_AREA);
        AbilityIndicatorPoint abilityIndicatorPoint = new AbilityIndicatorPoint(trans, m_casterTransform, radius);

        abilityInput.AddAbilityIndicator(abilityIndicatorRange);
        abilityInput.AddAbilityIndicator(abilityIndicatorSegment);
        abilityInput.AddAbilityIndicator(abilityIndicatorPoint);
        return(abilityInput);
    }
Ejemplo n.º 2
0
    // 点施法类型,王昭君大招
    private AbilityInput CreateAbilityPointInput(AbilityBehavior abilityBehavior)
    {
        var abilityInput = new AbilityInputPoint(m_casterTransform, ability);

        if ((abilityBehavior & AbilityBehavior.ABILITY_BEHAVIOR_RADIUS_AOE) != 0)
        {
            var radius = ability.GetAbilityAOERadius();
            var trans  = GetIndicatorAsset(AbilityIndicatorType.RANGE_AREA);
            AbilityIndicatorRange abilityIndicatorRange = new AbilityIndicatorRange(trans, m_casterTransform, ability.GetCastRange());
            trans = GetIndicatorAsset(AbilityIndicatorType.CIRCLE_AREA);
            AbilityIndicatorPoint abilityIndicatorPoint = new AbilityIndicatorPoint(trans, m_casterTransform, radius);

            abilityInput.AddAbilityIndicator(abilityIndicatorRange);
            abilityInput.AddAbilityIndicator(abilityIndicatorPoint);
        }
        else
        {
            BattleLog.LogError("技能[{0}]中有未定义的Point类型技能区域", ability.GetConfigName());
        }

        return(abilityInput);
    }