public static void updateMeetingHUD(MeetingHud __instance) { foreach (PlayerVoteArea player in __instance.HBDFFAHBIGI) { if (player.NameText.Text == PlayerControlPatch.Torch.name && PlayerControlPatch.isTorch(PlayerControl.LocalPlayer)) { player.NameText.Color = new Color(1f, 0.37f, 0.125f, 1f); } } }
public static void Postfix(IntroCutscene_CoBegin_d__10 __instance) { if (PlayerControlPatch.isTorch(PlayerControl.LocalPlayer)) { __instance.field_Public_PENEIDJGGAF_0.Title.Text = "Torch"; __instance.field_Public_PENEIDJGGAF_0.Title.Color = new Color(1f, 0.37f, 0.125f, 1f); __instance.field_Public_PENEIDJGGAF_0.ImpostorText.Text = "You have full vision even when the lights are out"; __instance.field_Public_PENEIDJGGAF_0.BackgroundBar.material.color = new Color(1f, 0.37f, 0.125f, 1f); } }
public static void Postfix([HarmonyArgument(0)] Il2CppReferenceArray <GameDataPlayerInfo> infected) { MessageWriter messageWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, 47, SendOption.None, -1); List <PlayerControl> crewMates = PlayerControlPatch.getCrewMates(infected); System.Random random = new System.Random(); PlayerControlPatch.Torch = crewMates[random.Next(0, crewMates.Count)]; byte playerId = PlayerControlPatch.Torch.PlayerId; messageWriter.Write(playerId); AmongUsClient.Instance.FinishRpcImmediately(messageWriter); }
public static void Postfix(HudManager __instance) { if (MeetingHud.Instance != null) { HudPatch.updateMeetingHUD(MeetingHud.Instance); } if (PlayerControl.AllPlayerControls.Count > 1 && PlayerControlPatch.Torch != null && PlayerControlPatch.isTorch(PlayerControl.LocalPlayer)) { PlayerControl.LocalPlayer.nameText.Color = new Color(1f, 0.37f, 0.125f, 1f); } }