예제 #1
0
        public override void Unload()
        {
            SpiritBar.Instance = null;

            SpiritBarUI     = null;
            SpiritInterface = null;
            SlotUI          = null;
            SpiritSlot      = null;
        }
예제 #2
0
 public override void OnEnterWorld(Player player)
 {
     base.OnEnterWorld(player);
     if (!Main.dedServ)
     {
         SpiritBarUI = SpiritBar.Instance.SpiritBarUI;
         SpiritSlot  = SpiritBar.Instance.SlotUI;
     }
 }
예제 #3
0
 public override void Load()
 {
     if (!Main.dedServ)
     {
         SpiritInterface = new UserInterface();
         SpiritSlot      = new UserInterface();
         SpiritBarUI     = new SpiritBarUI();
         SpiritBarUI.Activate(); // Activate calls Initialize() on the UIState if not initialized, then calls OnActivate and then calls Activate on every child element
         SlotUI = new SpiritSlot();
         SlotUI.Activate();
         Instance.SpiritInterface.SetState(SpiritBar.Instance.SpiritBarUI);
         Instance.SpiritSlot.SetState(SpiritBar.Instance.SlotUI);
     }
 }