Exemplo n.º 1
0
        public static void Load(string filepath)
        {
            if (!string.IsNullOrEmpty(filepath))
            {
                var text = System.IO.File.ReadAllText(filepath);
                _nodeTreeGroup = NodeTreeGroup.Deserialize(text);
            }

            ReconstructNodeTree();
        }
Exemplo n.º 2
0
        public static bool Initialize(string title, int width, int height, Configuration config = null)
        {
            config ??= new Configuration();
            config.EnabledCoreModules |= CoreModules.Tool;

            var res = Engine.Initialize(title, width, height, config);

            Engine.Tool.AddFontFromFileTTF("../TestData/Font/mplus-1m-regular.ttf", 20, ToolGlyphRange.Japanese);
            Engine.Tool.ToolUsage = ToolUsage.Main;

            LoadPartsFile("./");

            _environment    = new Environment();
            _commandManager = new CommandManager();
            _nodeTreeGroup  = new();
            _nodeTreeGroup.Init(typeof(Node), _environment);
            ReconstructNodeTree();

            return(res);
        }