public void SetPair(PortalGate gate)
        {
            if (pair == null && gate != null)
            {
                StartCoroutine(UpdateRateCoroutine(ShaderParam.ConnectRate, connectTime));
            }

            pair = gate;
        }
Beispiel #2
0
        void PassGate(PortalGate gate)
        {
            gate.UpdateTransformOnPair(transform);

            if (rigidbody_ != null)
            {
                rigidbody_.velocity    = gate.UpdateDirOnPair(rigidbody_.velocity);
                rigidbody_.useGravity  = false;
                ignoreGravityStartTime = Time.time;
            }

            if (fpController != null)
            {
                fpController.m_MoveDir = gate.UpdateDirOnPair(fpController.m_MoveDir);
                fpController.InitMouseLook();
            }
        }