Пример #1
0
    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();
        }
    }
Пример #2
0
 public StatusManager(PortalConnection portalConn)
 {
     this.portalConn = portalConn;
 }
Пример #3
0
 public Analyze(PortalConnection portalConn)
 {
     this.request = new Request();
     this.portalConn = portalConn;
     this.request.token = portalConn.token;
 }
Пример #4
0
 public GenerateToken(PortalConnection portalConn)
 {
     this.request = new Request();
     this.response = null;
     this.portalConn = portalConn;
 }
Пример #5
0
 public CreateFolder(PortalConnection portalConn)
 {
     this.request = new Request();
     this.portalConn = portalConn;
     this.request.token = portalConn.token;
 }
Пример #6
0
 public CheckServiceName(PortalConnection portalConn)
 {
     this.request = new Request();
     this.response = null;
     this.portalConn = portalConn;
 }