private void SetAreaTriggerBuildingsInRangeOf(int x, int z, SpatialIndex spatialIndex)
        {
            Board <Entity>     board  = Service.Get <BoardController>().Board;
            BoardCell <Entity> cellAt = board.GetCellAt(x, z, true);

            spatialIndex.AlreadyScannedAreaTriggerBuildingsInRange = true;
            NodeList <AreaTriggerBuildingNode> nodeList = Service.Get <EntityController>().GetNodeList <AreaTriggerBuildingNode>();

            for (AreaTriggerBuildingNode areaTriggerBuildingNode = nodeList.Head; areaTriggerBuildingNode != null; areaTriggerBuildingNode = areaTriggerBuildingNode.Next)
            {
                Entity entity   = areaTriggerBuildingNode.Entity;
                int    num      = this.CalcSquredDistanceFromTransformToCell(areaTriggerBuildingNode.TransformComp, cellAt);
                int    nearness = this.CalcNearness(num);
                spatialIndex.AddAreaTriggerBuildingsInRangeOf(entity, num, nearness);
            }
        }