Axiom.SceneManagers.PortalConnected.Portal.getCurrentHomeZone C# (CSharp) Method

getCurrentHomeZone() public method

public getCurrentHomeZone ( ) : PCZone
return PCZone
		public PCZone getCurrentHomeZone()
		{
			return mCurrentHomeZone;
		}
		/** Get the Zone the Portal should be moved to

Usage Example

Esempio n. 1
0
		// delete a portal instance by pointer
		public void DestroyPortal( Portal p )
		{
			// remove the portal from it's target portal
			Portal targetPortal = p.getTargetPortal();
			if ( null != targetPortal )
			{
				targetPortal.setTargetPortal( null );
				// the targetPortal will still have targetZone value, but targetPortal will be invalid
			}
			// remove the Portal from it's home zone
			PCZone homeZone = p.getCurrentHomeZone();
			if ( null != homeZone )
			{
				// inform zone of portal change. Do here since PCZone is abstract
				homeZone.PortalsUpdated = true;
				homeZone.RemovePortal( p );
			}

			// remove the portal from the master portal list
			this.portals.Remove( p );
		}