예제 #1
0
        public void Update()
        {
            if (Vector3.Distance(mob.Transform.position, attackController.AttackTargetUnit.Transform.position) >
                mob.Model.AttackModel.MaxAttackDistance)                  //||()//todo проверка прямой видимости
            {
                if (useLog)
                {
                    Debug.Log($"{mob.Name} enemy {attackController.AttackTargetUnit.Name} too far ");
                }
                mob.Follow(attackTarget, true);
                return;
            }

            mob.FaceTarget(attackController.AttackTargetUnit.Transform.position);
        }