public bool canPlayerHeroTargetingType3(Monster p, bool checkTargetOnly, TargetingDecal decal)
    {
        _v    = p.cTransformPosition;
        _v.x += (p.fowardDirectionValue);

        if (p.hasShootingPos)
        {
            _v.y  = p.shootingPos[1];
            _v.y *= p.monsterData.scale;
        }
        else
        {
            _v.y += p.hitObject.height * 0.7f;
        }

        if (checkTargetOnly == false)
        {
            p.targetHeight   = p.hitObject.height;
            p.targetPosition = _v;
            p.targetUniqueId = -1;
            p.setSkillTarget(null);
        }

        if (decal != null)
        {
            _v   = p.cTransformPosition;
            _v.y = 1.0f;

            decal.setPosition(_v);
        }

        return(true);
    }
    // 리미트 거리가 있는 것.
    public bool canPlayerHeroTargetingType2(Monster p, bool checkTargetOnly, TargetingDecal decal)
    {
        //데미지 범위. exeData.attr[1];
        _target = TargetingData.getAutomaticTarget(p, targetType, targetAttr, canUseThisSkillOnThisType);

        if (_target == null)
        {
            return(false);
        }
        //단순히 현재 상태에서 검사!
        if (VectorUtil.DistanceXZ(_target.cTransformPosition, p.cTransformPosition) < _targetDistanceLimit)
        {
            if (checkTargetOnly == false)
            {
                p.setSkillTarget(_target);
                p.targetHeight   = _target.hitObject.height;
                p.targetPosition = _target.cTransformPosition;
                p.targetUniqueId = _target.stat.uniqueId;
            }

            _v   = _target.cTransformPosition;
            _v.y = 1.0f;

            decal.setPosition(_v);

            _target = null;
            return(true);
        }

        _target = null;
        return(false);
    }
Exemplo n.º 3
0
    public override void clear()
    {
        base.clear();

        _nowSelectedSkillData = null;

        if (decal != null)
        {
            GameManager.me.characterManager.setMonsterHeroTargetingDecal(decal);
        }

        decal = null;
    }
Exemplo n.º 4
0
    sealed public override void init(Monster monster)
    {
        base.init(monster);
        _delay = 0.0f;

        mon.cTransform.gameObject.name = "HERO_MONSTER!!!";
        mon.heroMonsterData.attackType.init(AttackData.AttackerType.Hero, AttackData.AttackType.Attack);

        decal = GameManager.me.characterManager.getMonsterHeroTargetingDecal();

        _nextCheckAI    = null;
        _hasNextCheckAI = false;
    }
//============= 플레이어 타게팅 검사 로직  =======================

    public bool canPlayerHeroTargetingType1(Monster p, bool checkTargetOnly, TargetingDecal decal)
    {
        // 플레이어 1번의 경우.....
        _v    = p.cTransformPosition;
        _v.x += ((p.isPlayerSide)?targetAttr[0].Get():-targetAttr[0].Get());

        if (checkTargetOnly == false)
        {
            p.targetPosition = _v;
        }

        _v.y = 1.0f;
        decal.setPosition(_v);

        return(true);
    }
    //============= 히어로 몬스터 타게팅 검사 로직  =======================

    public bool canPlayerHeroTypeReturnTrue(Monster player, bool checkTargetOnly, TargetingDecal decal)
    {
        return(true);
    }
    // 리미트 거리가 없는 것.
    public bool canPlayerHeroTargetingType2WithOutDistCheck(Monster p, bool checkTargetOnly, TargetingDecal decal)
    {
        _target = TargetingData.getAutomaticTarget(p, targetType, targetAttr, canUseThisSkillOnThisType);
        if (_target == null)
        {
            return(false);
        }


        if (checkTargetOnly == false)
        {
            p.setSkillTarget(_target);
            p.targetHeight   = _target.hitObject.height;
            p.targetPosition = _target.cTransformPosition;
            p.targetUniqueId = _target.stat.uniqueId;
        }

        //if(p.isPlayer)
        {
            _v   = _target.cTransformPosition;
            _v.y = 1.0f;

            decal.setPosition(_v);
        }

        _target = null;
        return(true);
    }