mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
28 lines
779 B
C#
28 lines
779 B
C#
using MiraAPI.Example.GameOver;
|
|
using MiraAPI.Example.Roles;
|
|
using MiraAPI.GameEnd;
|
|
using MiraAPI.Hud;
|
|
using MiraAPI.Keybinds;
|
|
using MiraAPI.Utilities.Assets;
|
|
using UnityEngine;
|
|
|
|
namespace MiraAPI.Example.Buttons;
|
|
|
|
public class NeutralKillerButton : CustomActionButton
|
|
{
|
|
public override string Name => "button.winGame";
|
|
public override float Cooldown => 0f;
|
|
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
|
public override MiraKeybind Keybind => ExampleKeybinds.NeutralWinKeybind;
|
|
|
|
protected override void OnClick()
|
|
{
|
|
CustomGameOver.Trigger<NeutralKillerGameOver>([PlayerControl.LocalPlayer.Data]);
|
|
}
|
|
|
|
public override bool Enabled(RoleBehaviour? role)
|
|
{
|
|
return role is NeutralKillerRole;
|
|
}
|
|
}
|