public void customupdate()
 {
     PlayerApiref.EnablePickups(enablepickups.isOn);
     if (!changeapi)
     {
         PlayerApiref.Immobilize(immobilize.isOn);
     }
 }
Beispiel #2
0
        private bool TestOtherPlayerSettings(VRCPlayerApi player)
        {
            if (player.isLocal)
            {
                Debug.Log("Player Immobilize");
                player.Immobilize(true);
                player.Immobilize(false);
            }

            Debug.Log("Player EnablePickups");
            player.EnablePickups(true);
            player.EnablePickups(false);

            Debug.Log("PlayHapticEventInHand");
            player.PlayHapticEventInHand(VRC_Pickup.PickupHand.Right, 1, .5f, .5f);

            return(true);
        }
Beispiel #3
0
    //public override void OnStationExited(VRC.SDKBase.VRCPlayerApi player)
    //{
    //    if (player.isLocal)
    //    {
    //        localUser = null;
    //        lastUsageTime = Time.time;
    //    }
    //}


    // Update is called once per frame
    void Update()
    {
        if (localUser != null || RunWithoutPlayer)
        {
            if (Input.GetKeyDown(DesktopJumpOffSnowboardKey))
            {
                station.ExitStation(localUser);
                localUser.Immobilize(false);
                localUser = null;
            }
            SnowboardingUpdate();
        }

        if (transform.position.y < -100)
        {
            ResetSnowboard();
        }
        else if (lastUsageTime != -1 && Time.time - lastUsageTime > ResetTimeoutAfterUsage)
        {
            ResetSnowboard();
        }
    }