private void OnTriggerEnter(Collider other) { Vector3 offset = other.transform.position - transform.position; PortalConnection portal = other.GetComponent <PortalConnection>(); if (portal != null && timeSinceLastTeleport > teleportCooldown) { Transform destination = portal.destination.transform; if (UseOffset) { transform.position = destination.position - offset; } else { transform.position = destination.position; } //transform.rotation = destination.rotation; timeSinceLastTeleport = 0.0f; enterAudio.panStereo = other.transform.position.x / 10; enterAudio.Play(); //exitAudio.panStereo = portal.transform.position.x / 10; //exitAudio.Play(); } }
public StatusManager(PortalConnection portalConn) { this.portalConn = portalConn; }
public Analyze(PortalConnection portalConn) { this.request = new Request(); this.portalConn = portalConn; this.request.token = portalConn.token; }
public GenerateToken(PortalConnection portalConn) { this.request = new Request(); this.response = null; this.portalConn = portalConn; }
public CreateFolder(PortalConnection portalConn) { this.request = new Request(); this.portalConn = portalConn; this.request.token = portalConn.token; }
public CheckServiceName(PortalConnection portalConn) { this.request = new Request(); this.response = null; this.portalConn = portalConn; }