Aurora.Modules.CityBuilder.CityMap.RemoveScene C# (CSharp) Метод

RemoveScene() публичный Метод

public RemoveScene ( Scene scene ) : bool
scene OpenSim.Region.Framework.Scenes.Scene
Результат bool
        public bool RemoveScene(Scene scene)
        {
            //  Remove the given scene from the city map
            if (scene.Equals(null))
                return (false);

            //  Firstly check to see if the region is part of one of the central regions.
            for (int c = 0; c < centralRegions.Count(); c++)
            {
                Scene s = centralRegions[c];
                if (s.Equals(scene))
                {
                    centralRegions.Remove(s);
                    break;
                }
            }

            //  Now scan the entire map and remove it.
            for (int rx = 0; rx < cityRegions.GetUpperBound(0); rx++)
            {
                for (int ry = 0; rx < cityRegions.GetUpperBound(1); ry++)
                {
                    Scene r = cityRegions[rx, ry];
                    if (r.Equals(scene))
                    {
                        cityRegions[rx, ry] = null;
                        return (true);
                    }
                }
            }

            return (false);
        }