コード例 #1
0
 public DeadPlayer(PlayerControl player, DateTime timeOfDeath, DeathReason deathReason, PlayerControl killerIfExisting)
 {
     this.player           = player;
     this.timeOfDeath      = timeOfDeath;
     this.deathReason      = deathReason;
     this.killerIfExisting = killerIfExisting;
 }
コード例 #2
0
        public static bool Prefix(InnerPlayerControl __instance, EGHDCAKGMKI AMGCOJNIHLM)
        {
            if (AmongUsClient.Instance.ClientId == AmongUsClient.Instance.HostId)
            {
                __instance.FIMGDJOCIGD.IAGJEKLJCCI = true;

                Player player = PlayerController.getPlayerById(__instance.PlayerId);

                if (player.hasComponent("Love") && CustomGameOptions.BothLoversDie)
                {
                    Love          love   = (Love)player.GetComponentByName("Love");
                    MessageWriter writer = AmongUsClient.Instance.StartRpc(InnerPlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LoveSuicide, Hazel.SendOption.Reliable);
                    writer.Write((byte)love.lover.playerdata.PlayerId);
                    writer.EndMessage();
                    love.lover.playerdata.MurderPlayer(love.lover.playerdata);
                }
            }


            return(true);
        }