Beispiel #1
0
 public override void Unload()
 {
     if (!Main.dedServ)
     {
         LifePool?.Disable();
         LifePool = null;
         ChatAnnouncements?.Disable();
         ChatAnnouncements = null;
     }
 }
Beispiel #2
0
        public void ConfigureUi(BflClientConfig clientConfiguration)
        {
            if (LifePool != null)
            {
                if (clientConfiguration.EnableLifePoolUi)
                {
                    LifePool.Enable();
                    LifePool.UpdateProperties();

                    if (clientConfiguration.ConfigurationMode || BflWorld.IsBossActive)
                    {
                        LifePool.Show();
                    }
                    else if (!BflWorld.IsBossActive && !clientConfiguration.ConfigurationMode)
                    {
                        LifePool.Hide();
                    }
                }
                else
                {
                    LifePool.Disable();
                }
            }

            if (ChatAnnouncements != null)
            {
                if (clientConfiguration.EnableChatAnnouncements)
                {
                    ChatAnnouncements.Enable();
                }
                else
                {
                    ChatAnnouncements.Disable();
                }
            }
        }