Exemplo n.º 1
0
        public void ExitStation(CyanEmuStationHelper station)
        {
            currentStation_ = null;
            characterController_.enabled = true;

            if (!station.IsMobile)
            {
                Teleport(station.ExitLocation, false);
            }
            mouseLook_.SetBaseRotation(null);
            jump_ = false;
        }
Exemplo n.º 2
0
        public void EnterStation(CyanEmuStationHelper station)
        {
            if (currentStation_ != null)
            {
                currentStation_.ExitStation();
            }

            currentStation_ = station;

            if (!station.IsMobile)
            {
                characterController_.enabled = false;
                Teleport(station.EnterLocation, false);
                mouseLook_.SetBaseRotation(station.EnterLocation);
                mouseLook_.SetRotation(Quaternion.identity);
            }
        }
        public static void InitializeStations(VRCStation station)
        {
            CyanEmuStationHelper prevHelper = station.gameObject.GetComponent <CyanEmuStationHelper>();

            if (prevHelper != null)
            {
                DestroyImmediate(prevHelper);
                station.LogWarning("Destroying old station helper on object: " + VRC.Tools.GetGameObjectPath(station.gameObject));
            }

            station.gameObject.AddComponent <CyanEmuStationHelper>();

            if (!station.seated && station.PlayerMobility != VRCStation.Mobility.Mobile)
            {
                station.LogWarning("Station has seated unchecked but is not mobile! " + VRC.Tools.GetGameObjectPath(station.gameObject));
            }
        }