private PortalManager mPortalManager = null;    //for making, linking portals

        // Use this for initialization
        private void Start()
        {
            // Get Portal Manager ref
            mPortalManager = GetComponentInParent <PortalManager>();
            Debug.Assert(mPortalManager != null);

            // Grab all the mesh renderers in cursor, hide them
            meshRenderers = this.gameObject.GetComponentsInChildren <MeshRenderer>();
            foreach (MeshRenderer mesh in meshRenderers)
            {
                mesh.enabled = false;
            }

            // Start rotation at 0
            rotation = 0.0f;
        }
Example #2
0
 // Use for instantiation
 void Awake()
 {
     portalManager = GameObject.Find("PortalManager").GetComponent <PortalManager>();
     Debug.Assert(portalManager != null);
     Debug.Assert(button != null);
 }