Пример #1
0
        public override void Load()
        {
            instance = this;

            tools = new List <Tool>();
            if (ModLoader.windows)             // REPL tool not working non-windows yet. Is this the attribute problem?
            {
                tools.Add(new Tools.REPL.REPLTool());
            }
            tools.Add(new Tools.Hitboxes.HitboxesTool());
            tools.Add(new Tools.Dusts.DustTool());
            tools.Add(new Tools.Items.ItemTool());
            tools.Add(new Tools.Projectiles.ProjectilesTool());
            tools.Add(new Tools.PlayerLayer.PlayerLayerTool());
            tools.Add(new Tools.InterfaceLayer.InterfaceLayerTool());
            tools.Add(new Tools.Spawns.SpawnTool());
            // Not ready yet tools.Add(new Tools.Loot.LootTool());

            tools.ForEach(tool => tool.Initialize());

            if (!Main.dedServ)
            {
                tools.ForEach(tool => tool.ClientInitialize());
            }
        }
Пример #2
0
        public override void Unload()
        {
            instance = null;
            tools    = null;

            UIElements.UICheckbox.checkboxTexture          = null;
            UIElements.UICheckbox.checkmarkTexture         = null;
            UIElements.UICheckbox2.checkboxTexture         = null;
            UIElements.UICheckbox2.checkmarkTexture        = null;
            UIElements.UITriStateCheckbox.checkboxTexture  = null;
            UIElements.UITriStateCheckbox.checkmarkTexture = null;
            UIElements.UITriStateCheckbox.checkXTexture    = null;
        }
Пример #3
0
        public override void Load()
        {
            instance = this;

            tools = new List <Tool>();
            if (Platform.IsWindows)             // REPL tool not working non-windows yet. Is this the attribute problem?
            {
                tools.Add(new Tools.REPL.REPLTool());
            }
            tools.Add(new Tools.Hitboxes.HitboxesTool());
            tools.Add(new Tools.Dusts.DustTool());
            tools.Add(new Tools.Items.ItemTool());
            tools.Add(new Tools.Projectiles.ProjectilesTool());
            tools.Add(new Tools.PlayerLayer.PlayerLayerTool());
            tools.Add(new Tools.InterfaceLayer.InterfaceLayerTool());
            tools.Add(new Tools.Spawns.SpawnTool());
            tools.Add(new Tools.Textures.TextureTool());
            // Not ready yet tools.Add(new Tools.Loot.LootTool());
            tools.Add(new Tools.UIPlayground.UIPlaygroundTool());
            tools.Add(new Tools.Backgrounds.BackgroundsTool());
            tools.Add(new Tools.Miscellaneous.MiscellaneousTool());

            tools.ForEach(tool => tool.Initialize());

            if (!Main.dedServ)
            {
                tools.ForEach(tool => tool.ClientInitialize());

                UIElements.UICheckbox.checkboxTexture          = GetTexture("UIElements/checkBox");
                UIElements.UICheckbox.checkmarkTexture         = GetTexture("UIElements/checkMark");
                UIElements.UICheckbox2.checkboxTexture         = GetTexture("UIElements/checkBox");
                UIElements.UICheckbox2.checkmarkTexture        = GetTexture("UIElements/checkMark");
                UIElements.UITriStateCheckbox.checkboxTexture  = GetTexture("UIElements/checkBox");
                UIElements.UITriStateCheckbox.checkmarkTexture = GetTexture("UIElements/checkMark");
                UIElements.UITriStateCheckbox.checkXTexture    = GetTexture("UIElements/checkX");
            }
        }