//导出工程
        private void ExportScriptsTo(string dir)
        {
            //资源
            ResourceManager.Export(dir);

            //地图
            MapEventsManager.Export(dir);

            //剧本
            StoryManager.Export(dir);

            //人物
            RoleManager.Export(dir);

            //技能
            SkillManager.Export(dir);

            //物品
            ItemManager.Export(dir);

            //战斗
            BattleManager.Export(dir);

            MessageBox.Show("保存成功!");
        }
Example #2
0
    void Awake()
    {
        //self init
        Dispatcher = new UIDispather(this);

        //game init
        ResourceManager.Init();
        //AudioManager.Init (this);
        //AnimationManager.Init();
        SkillManager.Init();
        //ItemManager.Init();
        RoleManager.Init();
        //ShopManager.Init();
        //SellShopManager.Init();
        MapEventsManager.Init();
        //BattleManager.Init();
        //TowerManager.Init();
        StoryManager.Init(this);
        TaskManager.Init(this);
        //TimeTriggerManager.Init();
        //boost game
        this.reset();

        RuntimeData.Instance.Init();
        RuntimeData.Instance.storyGameEngine = new StoryGameEngine(this);
        //mainMenu.Load();

        //各模块赋初值
        taskUI.taskGrid.Show(TaskManager.drawTasks());
        trainUI.Show();

        //开始测试
        storyMode();
        RuntimeData.Instance.storyGameEngine.NewGame();
    }
        private void CurrentMapCombo_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            if ((sender as ComboBox).SelectedItem == null)
            {
                return;
            }
            string mapKey = (sender as ComboBox).SelectedItem.ToString();

            CurrentMapScript.Text = MapEventsManager.GetBigMap(mapKey).GenerateXml().ToString();
        }
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Constructor.
        /// </summary>
        public MapControl()
        {
            InitializeComponent();

            MapLayersWidget.ActiveBaseLayerChanged += new RoutedEventHandler(MapLayersWidget_ActiveBaseLayerChanged);

            _mapTips    = new MapTips();
            _tools      = new MapTools(this, toolPanel);
            _clustering = new Clustering(this);

            _mapSelectionManager = new MapSelectionManager(this, _clustering, _objectLayers);
            _mapEventsManager    = new MapEventsManager(this, _mapSelectionManager, _clustering, _tools, _mapTips);
            _mapExtentManager    = new MapExtentManager(this, _clustering, _mapSelectionManager);
        }
Example #5
0
    public void Load(string key)
    {
        active = true;
        BigMap bigMap = MapEventsManager.GetBigMap(key);

        if (bigMap == null)
        {
            Debug.Log("错误,地图" + key + "不存在!");
            return;
        }
        RuntimeData.Instance.CurrentBigMap = bigMap.Name;
        currentMap = bigMap;
        resetMap();
        NGUITools.SetActive(this.gameObject, true);
    }
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Constructor.
        /// </summary>
        public MapControl()
        {
            InitializeComponent();

            MapLayersWidget.ActiveBaseLayerChanged += new RoutedEventHandler(MapLayersWidget_ActiveBaseLayerChanged);

            _mapTips = new MapTips();
            _tools = new MapTools(this, toolPanel);
            _clustering = new Clustering(this);

            _mapSelectionManager = new MapSelectionManager(this, _clustering, _objectLayers);
            _mapEventsManager = new MapEventsManager(this, _mapSelectionManager, _clustering, _tools, _mapTips);
            _mapExtentManager = new MapExtentManager(this, _clustering, _mapSelectionManager);
        }