protected void SingleVictory() { if (Player == null) { return; } EndGameCentral.RoleVictory = this; ExtraNetwork.Send(CustomRPC.SingleWin, Writer => { Writer.Write(RoleNo); Writer.Write(Player.PlayerId); }); foreach (var SomePlayer in PlayerControl.AllPlayerControls) { if (SomePlayer != Player) { SomePlayer.RemoveInfected(); SomePlayer.MurderPlayer(SomePlayer); SomePlayer.Data.IsDead = true; SomePlayer.Data.IsImpostor = false; } else { SomePlayer.Revive(); SomePlayer.Data.IsDead = false; SomePlayer.Data.IsImpostor = true; } } }
public static void DebugWin(PlayerControl Winner) { if (!DEBUG) { return; } if (Winner == null) { return; } foreach (var SomePlayer in PlayerControl.AllPlayerControls) { if (SomePlayer != Winner) { SomePlayer.RemoveInfected(); SomePlayer.MurderPlayer(SomePlayer); SomePlayer.Data.IsDead = true; SomePlayer.Data.IsImpostor = false; } else { SomePlayer.Revive(); SomePlayer.Data.IsDead = false; SomePlayer.Data.IsImpostor = true; } } }