Esempio n. 1
0
 public static void CreateButton()
 {
     if (Button != null)
     {
         return;
     }
     Button           = new GameplayButton(PopeyesRolesModPlugin.Assets.Heart, new HudPosition(GameplayButton.OffsetX, 0, HudAlignment.BottomRight));
     Button.OnClick  += Button_OnClick;
     Button.OnUpdate += Button_OnUpdate;
 }
Esempio n. 2
0
        public static void CreateButton()
        {
            if (Button != null)
            {
                return;
            }
            Button           = new GameplayButton(PopeyesRolesModPlugin.Assets.Settings, new HudPosition(GameplayButton.OffsetX, 0, HudAlignment.BottomRight));
            Button.OnClick  += Button_OnClick;;
            Button.OnUpdate += Button_OnUpdate;

            lastQ = Input.GetKeyUp(KeyCode.Q);

            if (Input.GetKeyDown(KeyCode.Q) && !lastQ && Button.IsUsable)
            {
                Button.PerformClick();
            }
        }