public static void CreateButton() { if (Button != null) { Button.CooldownDuration = PlayerDataManager.Instance.Config.ShapeShifterSampleCooldown; return; } Button = new CooldownButton(PopeyesRolesModPlugin.Assets.PlaceHolder, new HudPosition(GameplayButton.OffsetX, 1.2f, HudAlignment.BottomRight), PlayerDataManager.Instance.Config.ShapeShifterSampleCooldown, 0f, 0f); Button.OnClick += Button_OnClick_Sample; Button.OnUpdate += Button_OnUpdate; }
public static void CreateButton() { var cfg = PlayerDataManager.Instance.Config; if (Button != null) { Button.CooldownDuration = cfg.HunterKillCooldown; return; } Button = new CooldownButton(sprite: null, new HudPosition(GameplayButton.OffsetX, 0, HudAlignment.BottomRight), cfg.HunterKillCooldown, 0f, 10f); Button.OnClick += Button_OnClick; Button.OnUpdate += Button_OnUpdate; }
public static void CreateButton() { var cfg = PlayerDataManager.Instance.Config; if (Button != null) { Button.EffectDuration = cfg.ShapeShifterMorphDuration; Button.CooldownDuration = cfg.ShapeShifterMorphCooldown; return; } Button = new CooldownButton(PopeyesRolesModPlugin.Assets.Trophy, new HudPosition(GameplayButton.OffsetX, 1.2f, HudAlignment.BottomRight), cfg.ShapeShifterMorphCooldown, cfg.ShapeShifterMorphDuration, 0.5f); Button.EffectStarted += Button_EffectStarted_Morph; Button.EffectEnded += Button_EffectEnded_Morph; Button.OnUpdate += Button_OnUpdate; }
public override void Load() { Harmony.PatchAll(); #if !S20210615 && !S20210630 RegisterInIl2CppAttribute.Register(); RegisterCustomRpcAttribute.Register(this); #endif ConvertButton = new CooldownButton("Resources.Button.png", new HudPosition(GameplayButton.OffsetX, GameplayButton.OffsetY, HudAlignment.BottomRight), PlayerControl.GameOptions.KillCooldown, 0, 10) { Visible = false, Clickable = false }; ConvertButton.OnClick += ConvertButton_OnClick; ConvertButton.OnUpdate += ConvertButton_OnUpdate; }
public static void Postfix(HudManager __instance) { btn = new CooldownButton( () => { btn.Timer = btn.MaxTimer; System.Console.WriteLine("Button Pressed!"); }, 5f, "GamerMod.Resources.BatmanButton.png", 0.25f, new Vector2(0.125f, 0.125f), CooldownButton.Category.Everyone, __instance ); }
public static void Postfix(HudManager __instance) { CooldownButton.HudUpdate(); }
public void Z_CooldownBtn(CooldownButton cooldownButton) { this.cooldownButton = cooldownButton; }