Drought.Entity.MovableEntity.checkForWater C# (CSharp) Method

checkForWater() protected method

protected checkForWater ( ) : void
return void
        protected void checkForWater()
        {
            if (prevHasMoved && !hasMoved)
            {
                for (int x = -waterRadius; x <= waterRadius; x++)
                    for (int y = -waterRadius; y <= waterRadius; y++)
                    {
                        if (levelInfo.getPoolAt((int)position.X + x, (int)position.Y + y) != null)
                        {
                            currWaterPool = levelInfo.getPoolAt((int)position.X + x, (int)position.Y + y);
                            return;
                        }
                    }

                currWaterPool = null;
            }
        }