Exemplo n.º 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);
        }
    }
Exemplo n.º 2
0
    void Update()
    {
        if (!Witch.SkillSys.CurrentSkill.IsOn)
        {
            if (Witch.CloseTelCheck)
            {
                Witch.Anim.speed = 1.0f;
                Witch.RotateToTarget(Witch.Target.transform.position);
                Witch.SetState(WitchState.Attack);
                return;
            }

            else
            {
                if (Witch.DistanceCheck(Witch.Stat.AttackDistance))
                {
                    Witch.SetState(WitchState.Attack);
                    return;
                }
            }

            Witch.SetState(WitchState.Chase);
            return;
        }
    }
Exemplo n.º 3
0
    public override void BeginState()
    {
        if (!Witch.CloseTelCheck)
        {
            Witch.SetAttack();
        }

        Witch.RotateToTarget(Witch.Target.transform.position);
        Witch.MoveStop();
        _randTel = false;
    }
Exemplo n.º 4
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);
        }
    }
Exemplo n.º 5
0
 public override void BeginState()
 {
     m_minDis   = Mathf.Infinity;
     m_useSkill = null;
     Witch.RotateToTarget(GameObject.Find("Player").transform.position);
 }