Axiom.SceneManagers.PortalConnected.DefaultZone.AddPortal C# (CSharp) Метод

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

public AddPortal ( Portal newPortal ) : void
newPortal Portal
Результат void
		public override void AddPortal( Portal newPortal )
		{
			if ( null != newPortal )
			{
				// make sure portal is unique (at least in this zone)
				if ( mPortals.Contains( newPortal ) )
				{
					throw new AxiomException( "A portal with the name " + newPortal.getName() + "already exists. DefaultZone._addPortal" );
				}

				// add portal to portals list
				mPortals.Add( newPortal );

				// tell the portal which zone it's currently in
				newPortal.setCurrentHomeZone( this );
			}
		}