Exemplo n.º 1
0
 public static void Postfix(IntroCutscene_CoBegin_d__10 __instance)
 {
     if (PlayerControlPatch.IsSweeper(PlayerControl.LocalPlayer))
     {
         __instance.field_Public_PENEIDJGGAF_0.Title.Text                   = "Sweeper";
         __instance.field_Public_PENEIDJGGAF_0.Title.Color                  = new Color(0f, 0.33f, 0.79f, 1f);
         __instance.field_Public_PENEIDJGGAF_0.ImpostorText.Text            = "Use vents to move around";
         __instance.field_Public_PENEIDJGGAF_0.BackgroundBar.material.color = new Color(0f, 0.33f, 0.79f, 1f);
     }
 }
Exemplo n.º 2
0
 public static void updateMeetingHUD(MeetingHud __instance)
 {
     foreach (PlayerVoteArea player in __instance.HBDFFAHBIGI)
     {
         if (player.NameText.Text == PlayerControlPatch.Sweeper.name && PlayerControlPatch.IsSweeper(PlayerControl.LocalPlayer))
         {
             player.NameText.Color = new Color(0f, 0.33f, 0.79f, 1f);
         }
     }
 }
Exemplo n.º 3
0
        public static void Postfix([HarmonyArgument(0)] Il2CppReferenceArray <GameDataPlayerInfo> infected)
        {
            MessageWriter        messageWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, 42, SendOption.None, -1);
            List <PlayerControl> crewMates     = PlayerControlPatch.getCrewMates(infected);

            System.Random random = new System.Random();
            PlayerControlPatch.Sweeper = crewMates[random.Next(0, crewMates.Count)];
            byte playerId = PlayerControlPatch.Sweeper.PlayerId;

            messageWriter.Write(playerId);
            AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
        }
Exemplo n.º 4
0
 public static void Postfix(HudManager __instance)
 {
     if (MeetingHud.Instance != null)
     {
         HudPatch.updateMeetingHUD(MeetingHud.Instance);
     }
     if (PlayerControl.AllPlayerControls.Count > 1 && PlayerControlPatch.Sweeper != null && PlayerControlPatch.IsSweeper(PlayerControl.LocalPlayer))
     {
         PlayerControl.LocalPlayer.nameText.Color = new Color(0f, 0.33f, 0.79f, 1f);
     }
 }