Beispiel #1
0
 public void UpdateUI()
 {
     if (player.talkNPC != -1)
     {
         if (!ArmUI.Visible)
         {
             if (NPC.downedMoonlord && Main.LocalPlayer.HeldItem.type == ModContent.ItemType <AttackerStick>())
             {
                 UINPCExtraButton.Visible = true;
             }
         }
         else
         {
             UINPCExtraButton.Visible = false;
         }
         if (!Main.playerInventory)
         {
             ArmUI.CloseUI();
         }
     }
     else
     {
         ArmUI.CloseUI();
         UINPCExtraButton.Visible = false;
     }
 }
Beispiel #2
0
        public override void Load()
        {
            On.Terraria.NPC.AI_007_TownEntities += AIHook;
            On.Terraria.NPC.StrikeNPC           += StrikeNPCHook;
            On.Terraria.Main.DrawNPCChatButtons += DrawNPCChatButtonsHook;

            _UINPCExtraButton = new UINPCExtraButton();
            _UINPCExtraButton.Activate();
            _UINPCExtraButtonUserInterface = new UserInterface();
            _UINPCExtraButtonUserInterface.SetState(_UINPCExtraButton);

            _ArmUI = new ArmUI();
            _ArmUI.Activate();
            _ArmUserInterface = new UserInterface();
            _ArmUserInterface.SetState(_ArmUI);

            AddTrans();
        }