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);
        }
    }