public static void shieldedMurderAttempt() { if (Medic.shielded != null && Medic.shielded == PlayerControl.LocalPlayer && Medic.showAttemptToShielded && HudManager.Instance?.FullScreen != null) { Color c = Palette.ImpostorRed; HudManager.Instance.FullScreen.enabled = true; Reactor.Coroutines.Start(Helpers.CoFlashAndDisable( HudManager.Instance.FullScreen, 0.5f, new Color(c.r, c.g, c.b, 0f), new Color(c.r, c.g, c.b, 0.75f) )); } }
public static void seerReveal(byte targetId, byte targetOrMistakeId) { if (Seer.seer == null) { return; } PlayerControl target = Helpers.playerById(targetId); PlayerControl targetOrMistake = Helpers.playerById(targetOrMistakeId); if (target != null && targetOrMistake != null && !Seer.revealedPlayers.Keys.Any(p => p.Data.PlayerId == targetId)) { Seer.revealedPlayers.Add(target, targetOrMistake); if (PlayerControl.LocalPlayer == target && HudManager.Instance?.FullScreen != null) { RoleInfo si = RoleInfo.getRoleInfoForPlayer(target); // Use RoleInfo of target here, because we need the isGood of the targets role bool showNotification = false; if (Seer.playersWithNotification == 0) { showNotification = true; } else if (Seer.playersWithNotification == 1 && si.isGood) { showNotification = true; } else if (Seer.playersWithNotification == 2 && !si.isGood) { showNotification = true; } else if (Seer.playersWithNotification == 3) { showNotification = false; } if (showNotification) { HudManager.Instance.FullScreen.enabled = true; Reactor.Coroutines.Start(Helpers.CoFlashAndDisable( HudManager.Instance.FullScreen, 0.5f, new Color(42f / 255f, 187f / 255f, 245f / 255f, 0f), new Color(42f / 255f, 187f / 255f, 245f / 255f, 0.75f) )); } } } }