Exemplo n.º 1
0
 void Update()
 {
     if (Vector3.Distance(transform.position, m_hero.transform.position) <= 3.0f)
     {
         Witch.SetState(WitchState.Chase);
     }
 }
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
    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.º 4
0
 void Update()
 {
     if (Witch.DistanceCheck(15.0f))
     {
         Witch.SetState(WitchState.Chase);
         return;
     }
 }
Exemplo n.º 5
0
 void Update()
 {
     if (_spawn)
     {
         Witch.SetState(WitchState.Chase);
         return;
     }
 }
Exemplo n.º 6
0
    void Update()
    {
        if ((m_useSkill = SelectSkill()) == null)
        {
            Witch.SetState(WitchState.Idle);
        }

        m_useSkill.OnSkill(GameObject.Find("Player").transform);
        Witch.SetState(WitchState.Run);
    }
Exemplo n.º 7
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.º 8
0
    private void InitGroggyUpdate()
    {
        if (_init)
        {
            return;
        }

        if (Witch.DistanceCheck(Witch.Stat.ChaseDistance))
        {
            _init = true;
            Witch.SetState(WitchState.GroggyRelease);
            return;
        }
    }
Exemplo n.º 9
0
    private void NonInitGroggyUpdate()
    {
        if (!_init)
        {
            return;
        }

        _delayTime += Time.deltaTime;

        if (_delayTime >= WitchValueManager.I.GroggyDuration)
        {
            _delayTime = 0.0f;
            Witch.SetState(WitchState.GroggyRelease);
            return;
        }
    }
Exemplo n.º 10
0
    void Update()
    {
        if (!_endAnim)
        {
            return;
        }

        if (Witch.DistanceCheck(Witch.Stat.AttackDistance))
        {
            Witch.SetState(WitchState.Attack);
            return;
        }
        else
        {
            Witch.SetState(WitchState.Chase);
            return;
        }
    }
Exemplo n.º 11
0
    void Update()
    {
        if (_teleport)
        {
            _teleportTime += Time.deltaTime;

            if (_teleportTime >= 1.0f)
            {
                Witch.SkillSys.OnSkill(Witch.Target.transform);
                Witch.SetState(WitchState.Skill);
                _teleport = false;
                return;
            }
        }
        else
        {
            if (Witch.ReceiveDamage2 / Witch.Stat.MaxHp >= 0.1f)
            {
                Witch.ReceiveDamage2 = 0.0f;
                Witch.ReceiveDamage  = 0.0f;
                Witch.SetState(WitchState.MonsterSpawn);
                return;
            }

            if (Witch.ReceiveDamage >= WitchValueManager.I.TeleportDamage)
            {
                _teleport = true;
                Witch.SkillSys.OnTeleport(Witch.Target.transform, 0);
                Witch.ReceiveDamage = 0.0f;
                Witch.SetState(WitchState.Skill);
                _teleportTime = 0.0f;
                return;
            }

            if (!Witch.DistanceCheck(Witch.Stat.AttackDistance))
            {
                Witch.SetState(WitchState.Run);
                return;
            }
            else
            {
                Witch.SetState(WitchState.Attack);
                return;
            }
        }
        //    if (Vector3.Distance(Witch.Target.transform.position,
        //transform.position) > 15.0f)
        //        return;

        //    if (Witch.SkillSys.CurrentSkill != null)
        //    {
        //        if (!Witch.SkillSys.CurrentSkill.IsOn)
        //        {
        //            _delayTime += Time.deltaTime;

        //            if (_delayTime < 1.5f)
        //                return;

        //            Witch.SkillSys.OnSkill(Witch.Target.transform);
        //            Witch.SetState(WitchState.Skill);
        //            return;
        //        }
        //    }
        //    else
        //    {
        //        Witch.SkillSys.OnSkill(Witch.Target.transform);
        //        Witch.SetState(WitchState.Skill);
        //        return;
        //    }
    }
Exemplo n.º 12
0
 public void EndReleaseAnim()
 {
     Witch.SetState(WitchState.Chase);
     return;
 }