Ejemplo n.º 1
0
        public void StructureEconomyManagerRemoveRoadNearReidentialStructureDiagonalNoConnection()
        {
            ZoneStructureSO residentialZone = CreateZOneAtPosition(new Vector3Int(0, 0, 0));

            CreateRoadATPosition(new Vector3Int(3, 0, 3));

            StructureEconomyManager.PrepareRoadDemolition(new Vector3Int(3, 0, 3), grid);
            grid.RemoveStructureFromTheGrid(new Vector3(3, 0, 3));
            Assert.False(residentialZone.HasRoadAccess());
        }
Ejemplo n.º 2
0
        public void StructureEconomyManagerRemoveRoadNearReidentialStructureConnection()
        {
            ZoneStructureSO residentialZone = CreateZOneAtPosition(new Vector3Int(0, 0, 0));
            RoadStructureSO roadStructure   = ScriptableObject.CreateInstance <RoadStructureSO>();

            CreateRoadATPosition(new Vector3Int(3, 0, 0));
            StructureEconomyManager.PrepareRoadDemolition(new Vector3Int(3, 0, 0), grid);
            grid.RemoveStructureFromTheGrid(new Vector3(3, 0, 0));
            Assert.False(residentialZone.HasRoadAccess());
        }