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

setCurrentHomeZone() public method

public setCurrentHomeZone ( PCZone z ) : void
z PCZone
return void
		public void setCurrentHomeZone( PCZone z )
		{
			// do this here since more than one function calls setCurrentHomeZone
			// also _addPortal is abstract, so easier to do it here.
			if ( null != z )
			{
				// inform old zone of portal change.
				if ( null != mCurrentHomeZone )
				{
					mCurrentHomeZone.PortalsUpdated = true;
				}
				z.PortalsUpdated = true;   // inform new zone of portal change
			}
			mCurrentHomeZone = z;
		}

Usage Example

Esempio n. 1
0
        /** Indicates whether or not this zone requires zone-specific data for
         *  each scene node
         */

        /* Add a portal to the zone
         */

        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);
            }
        }
All Usage Examples Of Axiom.SceneManagers.PortalConnected.Portal::setCurrentHomeZone