예제 #1
0
        private void OnWorldUpdate()
        {
            _playerExplorer.SetDataSource(Game.Players);
            _unitExplorer.SetDataSource(Game.Units);
            _gameObjectExplorer.SetDataSource(Game.GameObjects);

            Invoke((Action)(() =>
            {
                if (!GeometryLoader.Initialized && Game.IsLoggedIn)
                {
                    var directoryPickerDialog = new CommonOpenFileDialog()
                    {
                        IsFolderPicker = true
                    };
                    if (directoryPickerDialog.ShowDialog() != CommonFileDialogResult.Ok)
                    {
                        return;
                    }

                    DBC.AsyncInitialize(directoryPickerDialog.FileName);

                    GeometryLoader.Initialize(string.Intern(directoryPickerDialog.FileName), Game.CurrentMap);
                }

                _renderControl.Invalidate();
            }));
        }