Ejemplo n.º 1
0
        public static Player GetSelectedPlayer(this QuickMenu instance)
        {
            var APIUser       = instance.field_APIUser_0;
            var playerManager = Wrappers.GetPlayerManager();

            return(playerManager.GetPlayer(APIUser.id));
        }
Ejemplo n.º 2
0
        public static void SetPosition(this Transform transform, float x_pos, float y_pos)
        {
            //localPosition
            var quickMenu = Wrappers.GetQuickMenu();

            float X = quickMenu.transform.Find("UserInteractMenu/ForceLogoutButton").localPosition.x - quickMenu.transform.Find("UserInteractMenu/BanButton").localPosition.x;
            float Y = quickMenu.transform.Find("UserInteractMenu/ForceLogoutButton").localPosition.x - quickMenu.transform.Find("UserInteractMenu/BanButton").localPosition.x;

            transform.transform.localPosition = new Vector3(X * x_pos, Y * y_pos);
        }
Ejemplo n.º 3
0
        public static Player GetPlayerByRayCast(this RaycastHit RayCast)
        {
            var gameObject = RayCast.transform.gameObject;

            return(GetPlayer(Wrappers.GetPlayerManager(), VRCPlayerApi.GetPlayerByGameObject(gameObject).playerId));
        }