private void CheckNeedExecAutoFocus()
        {
            this.AutoFit.set_velocity(new Vector2(Mathf.Clamp((float)this.AutoFit.get_velocity().x, -this.VELOCITY_MAX, this.VELOCITY_MAX), 0.0f));
            if ((double)Mathf.Abs((float)this.AutoFit.get_velocity().x) > (double)this.AUTOFIT_BEGIN_VELOCITY)
            {
                return;
            }
            List <GameObject> objects = new List <GameObject>();

            foreach (Component componentsInChild in (UnitInventoryJobIcon[])((Component)this).GetComponentsInChildren <UnitInventoryJobIcon>())
            {
                objects.Add(componentsInChild.get_gameObject());
            }
            GameObject gameObject = this.Focus(objects, false, false, 0.1f);

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null))
            {
                UnitInventoryJobIcon component = (UnitInventoryJobIcon)gameObject.GetComponent <UnitInventoryJobIcon>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && !component.IsDisabledBaseJobIcon())
                {
                    UnitEnhanceV3.Instance.OnJobSlotClick(((Component)component.BaseJobIconButton).get_gameObject());
                }
            }
            this.IsNeedAutoFit = false;
        }