mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
merge ruleset into editorconfig
This commit is contained in:
146 files changed
+672
-538
No files matched your search
@@ -61,11 +61,14 @@ public class TeleportButton : CustomActionButton
|
||||
{
|
||||
Camera.main.orthographicSize = MeetingHud.Instance ? 3f : ft;
|
||||
ResolutionManager.ResolutionChanged.Invoke((float)Screen.width / Screen.height, Screen.width, Screen.height, Screen.fullScreen);
|
||||
foreach (var cam in Camera.allCameras) cam.orthographicSize = Camera.main.orthographicSize;
|
||||
foreach (var cam in Camera.allCameras)
|
||||
cam.orthographicSize = Camera.main.orthographicSize;
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
foreach (var cam in Camera.allCameras) cam.orthographicSize = zoomDistance;
|
||||
foreach (var cam in Camera.allCameras)
|
||||
cam.orthographicSize = zoomDistance;
|
||||
ResolutionManager.ResolutionChanged.Invoke((float)Screen.width / Screen.height, Screen.width, Screen.height, Screen.fullScreen);
|
||||
}
|
||||
|
||||
@@ -75,12 +78,14 @@ public class TeleportButton : CustomActionButton
|
||||
{
|
||||
Camera.main.orthographicSize = MeetingHud.Instance ? 3f : ft;
|
||||
ResolutionManager.ResolutionChanged.Invoke((float)Screen.width / Screen.height, Screen.width, Screen.height, Screen.fullScreen);
|
||||
foreach (var cam in Camera.allCameras) cam.orthographicSize = Camera.main.orthographicSize;
|
||||
foreach (var cam in Camera.allCameras)
|
||||
cam.orthographicSize = Camera.main.orthographicSize;
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
foreach (var cam in Camera.allCameras) cam.orthographicSize = 3f;
|
||||
foreach (var cam in Camera.allCameras)
|
||||
cam.orthographicSize = 3f;
|
||||
HudManager.Instance.ShadowQuad.gameObject.SetActive(true);
|
||||
IsZoom = false;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using MiraAPI.Events;
|
||||
using MiraAPI.Events.Mira;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using MiraAPI.GameOptions;
|
||||
using System.Collections.Generic;
|
||||
using MiraAPI.GameOptions;
|
||||
using MiraAPI.GameOptions.Attributes;
|
||||
using MiraAPI.Utilities;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Example.Options;
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class ChameleonRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
private bool shouldHide;
|
||||
|
||||
public string IdPart => "Chameleon";
|
||||
public string IdPrefix => "ApiExample.Role.Crewmate";
|
||||
public Color RoleColor => Palette.AcceptedGreen;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
|
||||
private bool _shouldHide;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new(this)
|
||||
{
|
||||
OptionsScreenshot = ExampleAssets.Banner,
|
||||
@@ -30,12 +30,12 @@ public class ChameleonRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
Logger<ExamplePlugin>.Info("Initializing ChameleonRole for player: " + player.PlayerId);
|
||||
RoleBehaviourStubs.Initialize(this, player);
|
||||
_shouldHide = true;
|
||||
shouldHide = true;
|
||||
}
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
if (!Player || !_shouldHide)
|
||||
if (!Player || !shouldHide)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class ChameleonRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
Logger<ExamplePlugin>.Info("Deinitializing ChameleonRole for player: " + targetPlayer.PlayerId);
|
||||
RoleBehaviourStubs.Deinitialize(this, targetPlayer);
|
||||
_shouldHide = false;
|
||||
shouldHide = false;
|
||||
foreach (var cosmetic in Player.cosmetics.transform.GetComponentsInChildren<SpriteRenderer>(true))
|
||||
{
|
||||
cosmetic.color = Color.white;
|
||||
|
||||
Reference in new issue
Block a user