Esempio n. 1
0
        private bool playerInRange(Vector2 position, Farmer farmer)
        {
            if (isEssentialItem())
            {
                return(true);
            }
            int applied_magnetic_radius = farmer.GetAppliedMagneticRadius();

            if (Math.Abs(position.X + 32f - (float)farmer.getStandingX()) <= (float)applied_magnetic_radius)
            {
                return(Math.Abs(position.Y + 32f - (float)farmer.getStandingY()) <= (float)applied_magnetic_radius);
            }
            return(false);
        }