Ejemplo n.º 1
0
    public override bool isQualified(LChatacterAction curAction, LChatacterInterface character, LChatacterInformationInterface information)
    {
        if (!character.CanUsedSkill(cdName, skillState))
        {
            return(false);
        }
        int targetId = character.GetTargetId();

        if (targetId != -1)
        {
            LChatacterInterface target = information.GetCharacter(targetId);

            if (null == target || target.IsDead())
            {
                return(false);
            }
            var   selPos    = character.GetCurPosition();
            var   targetPos = target.GetCurPosition();
            float dis       = Vector3.Distance(selPos, targetPos);
            if (null != skillData && dis < skillData.skillRange)
            {
                return(true);
            }
        }
        return(false);
    }
Ejemplo n.º 2
0
    public override bool isQualified(LChatacterAction curAction, LChatacterInterface character, LChatacterInformationInterface information)
    {
        var  pos0  = character.GetCurPosition();
        var  pos   = information.getGroundHight(pos0);
        bool inAir = pos0.y - pos.y > 0.01f;

        if (VirtualInput.buttons[(int)button] && (!isOnGround || !inAir) && character.CanUsedSkill(cdName, skillState))
        {
            return(true);
        }

        return(false);
    }