public static void MimicButtonUpdate(Glitch __gInstance, HudManager __instance) { if (__gInstance.MimicButton == null) { __gInstance.MimicButton = KillButtonManager.Instantiate(__instance.KillButton); __gInstance.MimicButton.gameObject.SetActive(true); __gInstance.MimicButton.renderer.enabled = true; } __gInstance.MimicButton.renderer.sprite = MimicSprite; __gInstance.MimicButton.gameObject.SetActive(__instance.UseButton.isActiveAndEnabled && !__gInstance.Player.Data.IsDead); __gInstance.MimicButton.transform.position = new Vector3( Camera.main.ScreenToWorldPoint(new Vector3(0, 0)).x + 0.75f, __instance.UseButton.transform.position.y, __instance.UseButton.transform.position.z); __gInstance.MimicButton.SetCoolDown( CustomGameOptions.MimicCooldown - (float)(DateTime.UtcNow - __gInstance.LastMimic).TotalSeconds, CustomGameOptions.MimicCooldown); if (!__gInstance.MimicButton.isCoolingDown && !__gInstance.IsUsingMimic) { __gInstance.MimicButton.isCoolingDown = false; __gInstance.MimicButton.renderer.material.SetFloat("_Desat", 0f); __gInstance.MimicButton.renderer.color = Palette.EnabledColor; } else { __gInstance.MimicButton.isCoolingDown = true; __gInstance.MimicButton.renderer.material.SetFloat("_Desat", 1f); __gInstance.MimicButton.renderer.color = Palette.DisabledClear; } }
public static void HackButtonUpdate(Glitch __gInstance, HudManager __instance) { if (__gInstance.HackButton == null) { __gInstance.HackButton = KillButtonManager.Instantiate(__instance.KillButton); __gInstance.HackButton.gameObject.SetActive(true); __gInstance.HackButton.renderer.enabled = true; } __gInstance.HackButton.renderer.sprite = HackSprite; __gInstance.HackButton.gameObject.SetActive(__instance.UseButton.isActiveAndEnabled && !__gInstance.Player.Data.IsDead); __gInstance.HackButton.transform.position = new Vector3(__gInstance.MimicButton.transform.position.x, __instance.ReportButton.transform.position.y, __instance.ReportButton.transform.position.z); __gInstance.HackButton.SetCoolDown( CustomGameOptions.HackCooldown - (float)(DateTime.UtcNow - __gInstance.LastHack).TotalSeconds, CustomGameOptions.HackCooldown); __gInstance.HackButton.SetTarget(null); __gInstance.HackTarget = null; if (__gInstance.DistClosest < GameOptionsData.KillDistances[CustomGameOptions.GlitchHackDistance]) { __gInstance.HackButton.SetTarget(__gInstance.ClosestPlayer); __gInstance.HackTarget = __gInstance.ClosestPlayer; } if (__gInstance.HackTarget != null) { __gInstance.HackTarget.myRend.material.SetColor("_OutlineColor", __gInstance.Color); } }
public void DrawIcon(float x, float y, float z) { if (Button == null) { Button = KillButtonManager.Instantiate(HudManager.Instance.KillButton); Button.renderer.enabled = true; } Button.gameObject.SetActive(Main.Instance.GetLocalModdedPlayer().Role?.RoleName == "Bellatrix" ? Main.Instance.GetLocalModdedPlayer().Role.ShouldDrawCustomButtons() : HudManager.Instance.UseButton.isActiveAndEnabled); Button.SetCoolDown(0f, 10f); Button.renderer.material.SetFloat("_Desat", 0f); Button.renderer.color = Palette.EnabledColor; Button.renderer.sprite = Icon; Button.transform.position = new Vector3(x, y, z); Button.transform.localScale = new Vector2(0.5f, 0.5f); }
public Hermione(ModdedPlayerClass owner) { RoleName = "Hermione"; RoleColor = Palette.Orange; RoleColor2 = Palette.Orange; IntroString = "We could all have been\nkilled - or worse, expelled."; Owner = owner; if (!Owner._Object.AmOwner) { return; } HourglassButton = KillButtonManager.Instantiate(HudManager.Instance.KillButton); HourglassButton.renderer.enabled = true; }
public Harry(ModdedPlayerClass owner) { RoleName = "Harry"; RoleColor = Palette.Orange; RoleColor2 = Palette.Orange; IntroString = "I solemnly swear I am up to no good."; Owner = owner; if (!Owner._Object.AmOwner) { return; } InvisCloakButton = KillButtonManager.Instantiate(HudManager.Instance.KillButton); InvisCloakButton.renderer.enabled = true; }
public Ron(ModdedPlayerClass owner) { RoleName = "Ron"; RoleColor = Palette.Orange; RoleColor2 = Palette.Orange; IntroString = "Why Spiders!? Why couldn't it\nhave been follow the butterflies!?"; Owner = owner; if (!Owner._Object.AmOwner) { return; } DDButton = KillButtonManager.Instantiate(HudManager.Instance.KillButton); DDButton.renderer.enabled = true; }
public Bellatrix(ModdedPlayerClass owner) { RoleName = "Bellatrix"; RoleColor = Palette.ImpostorRed; RoleColor2 = Palette.ImpostorRed; IntroString = "Oh, he knows how to play,\nlittle bitty baby Potter."; Owner = owner; if (!Owner._Object.AmOwner) { return; } CrucioButton = KillButtonManager.Instantiate(HudManager.Instance.KillButton); CrucioButton.renderer.enabled = true; MindControlButton = KillButtonManager.Instantiate(HudManager.Instance.KillButton); MindControlButton.renderer.enabled = true; ControlMenu = new MindControlMenu(); }