예제 #1
0
        public PagedWorld GetWorld(string name)
        {
            PagedWorld ret = null;

            this.mWorlds.TryGetValue(name, out ret);
            return(ret);
        }
예제 #2
0
        public PagedWorld LoadWorld(Stream stream, string name)
#endif
        {
            PagedWorld ret = CreateWorld(name);

            ret.Load(stream);

            return(ret);
        }
예제 #3
0
 public PagedWorldSection(string name, PagedWorld parent, SceneManager sm)
     : base()
 {
     this.mName         = name;
     this.mParent       = parent;
     Strategy           = null;
     this.mPageProvider = null;
     this.mSceneMgr     = sm;
 }
예제 #4
0
        public PagedWorldSection CreateWorldSection(string typeName, string name, PagedWorld parent, SceneManager sm)
        {
            PagedWorldSectionFactory fact = GetWorldSectionFactory(typeName);

            if (fact == null)
            {
                throw new AxiomException("{0} is not the name of a valid PagedWorldSectionFactory PageManager.CreateWorldSection",
                                         typeName);
            }

            return(fact.CreateInstance(name, parent, sm));
        }
예제 #5
0
        public PagedWorld LoadWorld(string fileName, string name)
#endif
        {
            PagedWorld ret = CreateWorld(name);

            StreamSerializer ser = ReadWorldStream(fileName);

            ret.Load(ser);
            ser.SafeDispose();
            ser = null;

            return(ret);
        }
예제 #6
0
        public PagedWorld CreateWorld(string name)
#endif
        {
            string theName = name;

            if (theName == string.Empty)
            {
                do
                {
                    theName = this.mWorldNameGenerator.GetNextUniqueName();
                }while (this.mWorlds.ContainsKey(theName));
            }
            else if (this.mWorlds.ContainsKey(theName))
            {
                throw new AxiomException("World named '{0}' allready exists! PageManager.CreateWorld", theName);
            }

            var ret = new PagedWorld(theName, this);

            this.mWorlds.Add(theName, ret);

            return(ret);
        }
예제 #7
0
		public PagedWorld CreateWorld( string name )
#endif
		{
			string theName = name;
			if ( theName == string.Empty )
			{
				do
				{
					theName = this.mWorldNameGenerator.GetNextUniqueName();
				}
				while ( this.mWorlds.ContainsKey( theName ) );
			}
			else if ( this.mWorlds.ContainsKey( theName ) )
			{
				throw new AxiomException( "World named '{0}' allready exists! PageManager.CreateWorld", theName );
			}

			var ret = new PagedWorld( theName, this );
			this.mWorlds.Add( theName, ret );

			return ret;
		}
예제 #8
0
		public void SaveWorld( PagedWorld world, string fileName )
		{
			world.Save( fileName );
		}
예제 #9
0
 public void SaveWorld(PagedWorld world, Stream stream)
 {
     world.Save(stream);
 }
예제 #10
0
 public void SaveWorld(PagedWorld world, string fileName)
 {
     world.Save(fileName);
 }
예제 #11
0
		public void SaveWorld( PagedWorld world, Stream stream )
		{
			world.Save( stream );
		}
예제 #12
0
 public void DestroyWorld(PagedWorld world)
 {
     DestroyWorld(world.Name);
 }
예제 #13
0
 public abstract PagedWorldSection CreateInstance(string name, PagedWorld parent, SceneManager sm);
		public TerrainPagedWorldSection( string name, PagedWorld parent, SceneManager sm )
			: base( name, parent, sm )
		{
			// we always use a grid strategy
			Strategy = parent.Manager.GetStrategy( "Grid2D" );
		}
예제 #15
0
		public void DestroyWorld( PagedWorld world )
		{
			DestroyWorld( world.Name );
		}
예제 #16
0
			public override PagedWorldSection CreateInstance( string name, PagedWorld parent, SceneManager sm )
			{
				return new TerrainPagedWorldSection( name, parent, sm );
			}
예제 #17
0
		public TerrainPagedWorldSection CreateWorldSection( PagedWorld world, TerrainGroup terrainGroup, Real loadRadius,
		                                                    Real holdRadius,
#if NET_40
            int minX = -10, int minY = -10, int maxX = 10, int maxY = 10, string sectionName = "" )
예제 #18
0
		public abstract PagedWorldSection CreateInstance( string name, PagedWorld parent, SceneManager sm );
예제 #19
0
		public PagedWorldSection( string name, PagedWorld parent, SceneManager sm )
			: base()
		{
			this.mName = name;
			this.mParent = parent;
			Strategy = null;
			this.mPageProvider = null;
			this.mSceneMgr = sm;
		}
예제 #20
0
		public PagedWorldSection CreateWorldSection( string typeName, string name, PagedWorld parent, SceneManager sm )
		{
			PagedWorldSectionFactory fact = GetWorldSectionFactory( typeName );
			if ( fact == null )
			{
				throw new AxiomException( "{0} is not the name of a valid PagedWorldSectionFactory PageManager.CreateWorldSection",
				                          typeName );
			}

			return fact.CreateInstance( name, parent, sm );
		}