Esempio n. 1
0
        private void RegionManagerOnObjectRemoved(object sender, ObjectEvent e)
        {
            var structure = e.GameObject as IStructure;

            if (structure == null)
            {
                return;
            }

            foreach (var position in tileLocator.ForeachMultitile(structure))
            {
                DestroyRoad(position.X, position.Y, structure.City.RoadTheme);
            }
        }
Esempio n. 2
0
        private void RegionManagerOnObjectAdded(object sender, ObjectEvent e)
        {
            var structure = e.GameObject as IStructure;

            if (structure == null || objectTypeFactory.IsObjectType("NoRoadRequired", structure.Type))
            {
                return;
            }

            foreach (var position in tileLocator.ForeachMultitile(structure))
            {
                CreateRoad(position.X, position.Y, structure.City.RoadTheme);
            }
        }