Beispiel #1
0
    void Update()
    {
        if (Witch.DistanceCheck(Witch.Stat.AttackDistance) && !Witch.TelAttack)
        {
            Witch.SetState(WitchState.Attack);
            return;
        }

        if (Witch.CloseTelCheck)
        {
            Witch.SkillSys.OnTeleport(Witch.Target.transform, 1);
            Witch.SetState(WitchState.Skill);
            return;
        }

        if (!Witch.DistanceCheck(Witch.CloseDistance))
        {
            if (!Witch.TelAttack)
            {
                Witch.RotateToTarget(Witch.Target.transform.position);
                Witch.SetAttack();
                Witch.MoveStop();
                Witch.TelAttack = true;
                return;
            }
        }
        if (!Witch.TelAttack)
        {
            Witch.MoveToTargetLookAt(Witch.Target.transform.position);
        }
    }
Beispiel #2
0
    public override void BeginState()
    {
        if (!Witch.CloseTelCheck)
        {
            Witch.SetAttack();
        }

        Witch.RotateToTarget(Witch.Target.transform.position);
        Witch.MoveStop();
        _randTel = false;
    }
Beispiel #3
0
    void Update()
    {
        if (Witch.TelAttack)
        {
            if (Witch.CloseTelCheck)
            {
                Witch.SkillSys.OnTeleport(Witch.Target.transform, 1);
                Witch.TelAttack = false;
                Witch.SetState(WitchState.Skill);
                return;
            }
        }

        if (!Witch.DistanceCheck(Witch.Stat.AttackDistance) && !Witch.IsAttacking)
        {
            Witch.SetState(WitchState.Chase);
            return;
        }

        else if (!Witch.IsAttacking)
        {
            Witch.TelAttack = false;

            //if (Witch.TelAttack)
            //    return;
            _rand = Random.Range(0.0f, 100.0f);

            if (_rand >= 75.0f)
            {
                _randTel = true;

                if (_randTel)
                {
                    Witch.CloseTelCheck = false;
                    Witch.RotateToTarget(Witch.Target.transform.position);
                    Witch.SetAttack();
                    Witch.TelAttack = true;
                    return;
                }
            }
            //else if (_rand >= 50.0f)
            //{
            //    Witch.SetState(WitchState.AttackRelease);
            //    return;
            //}

            Witch.SetAttack();

            Witch.RotateToTarget(Witch.Target.transform.position);
        }
    }