private void InstantiateButtons() { m_uiBitrate = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetUIElementsBase(), VrcOverrideUI.GetUIElementsBase().transform.parent.gameObject, "BITRATE:\n<color=red>OFF</color>", () => { m_bitrateSwitched = !m_bitrateSwitched; FuckupBitrate(m_bitrateSwitched); if (m_bitrateSwitched) { VrcOverrideUI.ChangeUIButtonText(m_uiBitrate, "BITRATE:\n<color=green>ON</color>"); } else { VrcOverrideUI.ChangeUIButtonText(m_uiBitrate, "BITRATE:\n<color=red>OFF</color>"); } }, new[] { Vector2.up, Vector2.left }); m_uiMicGain = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetUIElementsBase(), VrcOverrideUI.GetUIElementsBase().transform.parent.gameObject, "GAIN:\n<color=red>OFF</color>", () => { m_gainSwitched = !m_gainSwitched; FuckupGain(m_gainSwitched); if (m_gainSwitched) { VrcOverrideUI.ChangeUIButtonText(m_uiMicGain, "GAIN:\n<color=green>ON</color>"); } else { VrcOverrideUI.ChangeUIButtonText(m_uiMicGain, "GAIN:\n<color=red>OFF</color>"); } }, new[] { Vector2.up }); }
private IEnumerator DelayedStart() { yield return(new WaitForSeconds(10)); Tick += TrackUser_Tick; m_uiTrackUser = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "TRACK", () => { trackingUser = !trackingUser; if (trackingUser) { APIUser targetUser = QuickMenuWrappers.SelectedUser; trackedUser = PlayerManager.GetPlayer(targetUser.id); self = PlayerWrappers.GetLocalPlayer(); VrcOverrideUI.ChangeUIButtonText(m_uiTrackUser, "[TRACKING]"); InstantiateStopTrackingButton(); } else { trackedUser = null; VrcOverrideUI.ChangeUIButtonText(m_uiTrackUser, "TRACK"); } }, new[] { Vector2.left }); }
private void SetupAirbreak() { IgnoreCollision(true); VrcOverrideUI.ChangeUIButtonText(m_uiNoClip, "NoClip:\n<color=green>ON</color>"); m_position = m_localPlayer.transform.position; m_originalGravity = Physics.gravity; Vector3 newGravity = m_originalGravity; newGravity.y = 0; Physics.gravity = newGravity; }
private void InstantiateStopTrackingButton() { m_uiStopTracking = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetUIElementsBase(), VrcOverrideUI.GetUIElementsBase().transform.parent.gameObject, "STOP\nTRACKING", () => { if (trackingUser) { trackingUser = !trackingUser; trackedUser = null; VrcOverrideUI.ChangeUIButtonText(m_uiTrackUser, "TRACK"); Object.Destroy(m_uiStopTracking); } }, new[] { Vector2.left, Vector2.left }); }
//private Dictionary<PhotonPlayer, PingFreezer> m_freezes = new Dictionary<PhotonPlayer, PingFreezer>(); private IEnumerator DelayedStart() { yield return(new WaitForSeconds(10)); /*m_uiGen5 = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "GEN5", () => * { * APIUser targetUser = QuickMenuWrappers.SelectedUser; * VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); * var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); * * Log.Info($"Logging out user {targetUser.displayName}"); * * Gen5 gen5 = new Gen5(photonPlayer); * gen5.Trigger(); * }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left, Vector2.left }); * * m_uiGen7 = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "GEN7", () => * { * APIUser targetUser = QuickMenuWrappers.SelectedUser; * VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); * var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); * * Log.Info($"Logging out user {targetUser.displayName}"); * * Gen7 gen7 = new Gen7(photonPlayer); * gen7.Trigger(); * }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left }); */ m_uiQuestionMark = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "?: <color=red>OFF</color>", () => { APIUser targetUser = QuickMenuWrappers.SelectedUser; VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); Log.Info($"Beginning ping freeze on {targetUser.displayName}"); m_active = !m_active; if (m_active) { m_qq = new LoglessGen2(photonPlayer); m_qq.Trigger(); VrcOverrideUI.ChangeUIButtonText(m_uiQuestionMark, "?: <color=green>ON</color>"); } else { m_qq.Stop(); VrcOverrideUI.ChangeUIButtonText(m_uiQuestionMark, "?: <color=green>OFF</color>"); } }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left }); }
private void DisableAirbreak() { IgnoreCollision(false); VrcOverrideUI.ChangeUIButtonText(m_uiNoClip, "NoClip:\n<color=red>OFF</color>"); Physics.gravity = m_originalGravity; }