Example #1
0
        protected override void OnDelete()
        {
            if (Instance == this)
            {
                Instance = null;
            }
            Crosshair?.Delete();
            Crosshair = null;

            HotbarImage = null;
            HotbarSelector?.Delete();
            HotbarSelector = null;

            HotbarImage = null;
            Hotbar?.Delete();
            Hotbar = null;

            Inventory?.Delete();
            Inventory = null;

            GlobalInventoryBackground?.Delete();
            GlobalInventoryBackground = null;

            ItemNameLabel.WObject.Delete();
            ItemNameLabel = null;

            HotbarItemsAmount  = null;
            HotbarItemsRenders = null;

            HoveredTooltipWObject.Delete();
            HoveredTooltipWObject = null;
            HoveredTooltip        = null;

            Player.LocalPlayer.OnHotbarUpdate         -= UpdateHotbarItem;
            Player.LocalPlayer.OnHotbarSelectedChange -= UpdateHotbarSelected;
            Player.LocalPlayer.OnContainerToggle      -= TogglePlayerInventory;
            Player.LocalPlayer.OnContainerClose       -= PlayerCloseInventory;
            Player.LocalPlayer.OnContainerOpen        -= PlayerOpenInventory;
            Player.LocalPlayer.OnItemUpdate           -= UpdateItem;
        }
Example #2
0
 public static void DeleteScene()
 {
     LoadScene.Delete();
 }