コード例 #1
0
        public UIEditableListViewDialog(IGameSystem gs) : base(gs)
        {
            var p = pButtons;

            btnAdd = new Button()
            {
                Dock = DockStyle.Fill
            }.init(w.add, () => addButtonClicked?.Invoke()).addTo(p);
            btnEdit = new Button()
            {
                Dock = DockStyle.Fill
            }.init(w.edit, () =>
            {
                var o = listView.FocusedItem;
                if (o == null)
                {
                    return;
                }
                editButtonClicked?.Invoke((string)o.Tag);
            }).addTo(p);
            btnRemove = new Button()
            {
                Dock = DockStyle.Fill
            }.init(w.remove, () =>
            {
                var o = listView.FocusedItem;
                if (o == null)
                {
                    return;
                }
                removeButtonClicked?.Invoke((string)o.Tag);
            }).addTo(p);
        }
コード例 #2
0
    private void RegisterSystem(IGameSystem gameSystem)
    {
        Type gameSystemType = gameSystem.GetType();

        m_gameSystems.Add(gameSystem);
        m_gameSystemsByType.Add(gameSystemType, gameSystem);
    }
コード例 #3
0
    IEnumerator Boom()
    {
        float vertExtent = (Camera.main.orthographicSize);
        float horzExtent = (Camera.main.orthographicSize * Screen.width / Screen.height);

        for (int i = 0; i < 5; i++)
        {
            float   x      = UnityEngine.Random.Range(-horzExtent, horzExtent);
            float   y      = UnityEngine.Random.Range(-vertExtent, vertExtent);
            Vector3 vector = new Vector3(x, y, -1.0f);
            Instantiate(Resources.Load("Boom"), vector, Quaternion.identity);
        }

        GameObject  go       = GameObject.FindGameObjectWithTag("GameController");
        IGameSystem gs       = go.GetComponent <IGameSystem> ();
        ArrayList   monsters = gs.MonsterList;

        foreach (IMonster monster in monsters)
        {
            monster.TakeDamage();
            monster.Speed /= 2;
        }

        yield return(new WaitForSeconds(2));

        foreach (IMonster monster in monsters)
        {
            monster.Speed *= 2;
        }
        Destroy(this.gameObject);
    }
コード例 #4
0
        protected override void Dispose(bool disposeManagedResources)
        {
            if (disposeManagedResources)
            {
                lock (this)
                {
                    var array = new IGameSystem[GameSystems.Count];
                    this.GameSystems.CopyTo(array, 0);
                    for (int i = 0; i < array.Length; i++)
                    {
                        var disposable = array[i] as IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }

                    var disposableGraphicsManager = graphicsDeviceManager as IDisposable;
                    if (disposableGraphicsManager != null)
                    {
                        disposableGraphicsManager.Dispose();
                    }

                    DisposeGraphicsDeviceEvents();

                    if (gamePlatform != null)
                    {
                        gamePlatform.Dispose();
                    }
                }
            }

            base.Dispose(disposeManagedResources);
        }
コード例 #5
0
    private void Awake()
    {
        IsDestroyed = false;

        if (m_instance != null)
        {
            Destroy(gameObject);
            Debug.LogError("More than one Game in scene.");
            return;
        }

        m_instance = this;
        DontDestroyOnLoad(gameObject);

        if (!CallbackDispatcher.IsInitialized)
        {
            gameObject.AddComponent <CallbackDispatcher>();
        }

        RegisterGameSystems();

        foreach (GameObject gameSystemPrefab in m_gameSystemPrefabs)
        {
            GameObject  gameSystemGameObject = Instantiate(gameSystemPrefab, transform);
            IGameSystem gameSystem           = gameSystemGameObject.GetComponent <IGameSystem>();
            Assert.IsNotNull(gameSystem);
            RegisterSystem(gameSystem);
        }

        foreach (IGameSystem gameSystem in m_gameSystems)
        {
            gameSystem.Setup();
        }
    }
コード例 #6
0
        public void OnStart()
        {
            DebugMy.Log("OnStart", this);

            mArchievementSystem = new ArchievementSystem();
            mCampSystem         = new CampSystem();
            mCharacterSystem    = new CharacterSystem();
            mEnergySystem       = new EnergySystem();
            mGameEventSystem    = new GameEventSystem();
            mStageSystem        = new StageSystem();

            mCampInfoUISystem      = new CampInfoUI();
            mGamePauseUISystem     = new GamePauseUI();
            mSoldierInfoUISystem   = new SoldierInfoUI();
            mGameStateInfoUISystem = new GameStateInfoUI();

            mArchievementSystem.OnInit();
            mCampSystem.OnInit();
            mCharacterSystem.OnInit();
            mEnergySystem.OnInit();
            mGameEventSystem.OnInit();
            mStageSystem.OnInit();

            mCampInfoUISystem.OnInit();
            mGamePauseUISystem.OnInit();
            mSoldierInfoUISystem.OnInit();
            mGameStateInfoUISystem.OnInit();
        }
コード例 #7
0
 private void MapSystemToComponent(IGameSystem system, Type componentType)
 {
     if (!_systemToComponentMapper.ContainsKey(componentType))
     {
         _systemToComponentMapper.Add(componentType, new List <IGameSystem>());
     }
     _systemToComponentMapper[componentType].Add(system);
 }
コード例 #8
0
        public UIWindow(IGameSystem gs)
        {
            gameSystem = gs;

            Owner = gs.formGame;

            panel.init().setAutoSizeP().addTo(this);

            this.setAutoSizeF().setCenter();
        }
コード例 #9
0
ファイル: GameSystems.cs プロジェクト: mandarinx/actionsystem
        public void Add(IGameSystem iGameSystem)
        {
            Type gameSystemType = iGameSystem.GetType();

            if (systemsTable.ContainsKey(gameSystemType))
            {
                return;
            }
            systems.Add(iGameSystem);
            systemsTable.Add(gameSystemType, iGameSystem);
        }
コード例 #10
0
ファイル: FramerokExtensions.cs プロジェクト: KuhPik/Mini-IT
        public static void PerformAction <T>(this IGameSystem system) where T : IGameSystem
        {
            if (system is T)
            {
                if (typeof(T) == typeof(IIniting))
                {
                    ((IIniting)system).OnInit();
                }

                else if (typeof(T) == typeof(ISubscribing))
                {
                    ((ISubscribing)system).OnSubscribe();
                }

                else if (typeof(T) == typeof(IDisposing))
                {
                    ((IDisposing)system).OnDispose();
                }
            }
        }
コード例 #11
0
        public UIListViewDialog(IGameSystem gs) : base(gs)
        {
            var tlp = new TableLayoutPanel()
            {
                ColumnCount = 2,
                RowCount    = 1,
                Dock        = DockStyle.Fill,
                MinimumSize = new Size(640, 480)
            }.addColumnStyle(80).addColumnStyle(20).addTo(panel);

            listView = new ListView().init().addTo(tlp);

            pButtons = new TableLayoutPanel()
            {
                ColumnCount = 1,
                RowCount    = 1,
                Dock        = DockStyle.Top
            }.setAutoSizeP().addTo(tlp);

            listView.autoResizeColumns();
        }
コード例 #12
0
 private void RegisterSystem(IGameSystem system)
 {
     _gameSystems.Add(system);
 }
コード例 #13
0
            bool IsOverride(IGameSystem system, string methodName)
            {
                var methodInfo = system.GetType().GetMethod(methodName);

                return(methodInfo.DeclaringType != typeof(GameSystem));
            }
コード例 #14
0
        public MortalCoilSolver()
            : base()
        {
            this.gameSystem = system.SystemInterface;
            this.graphics = gameSystem.Graphics;
            this.input = gameSystem.Input;

            FPSComponent fps = new FPSComponent(this);
            this.r = new Random();
        }
コード例 #15
0
ファイル: SubWorld.cs プロジェクト: MicahRClarke/CI328-Server
 /// <summary>
 /// Add system to the subworld.
 /// </summary>
 /// <param name="system">The system added to the subworld.</param>
 public void AddSystem(IGameSystem system)
 {
     Systems.Add(system.GetType(), system);
 }
コード例 #16
0
        internal void InitializePlugins(Screen screen)
        {
            AvailablePlugin plugin = Plugin.Plugins.AvailablePlugins.Find("HelpPlugin");

            if ((plugin != null) && (plugin.Instance is IHelp))
            {
                this.HelpPlugin = plugin.Instance as IHelp;
                this.HelpPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.HelpPlugin.SetScreen(screen);
                screen.PluginList.Add(this.HelpPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonDetailPlugin");
            if ((plugin != null) && (plugin.Instance is IPersonDetail))
            {
                this.PersonDetailPlugin = plugin.Instance as IPersonDetail;
                this.PersonDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.PersonDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.PersonDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopDetailPlugin");
            if ((plugin != null) && (plugin.Instance is ITroopDetail))
            {
                this.TroopDetailPlugin = plugin.Instance as ITroopDetail;
                this.TroopDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TroopDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.TroopDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ArchitectureDetailPlugin");
            if ((plugin != null) && (plugin.Instance is IArchitectureDetail))
            {
                this.ArchitectureDetailPlugin = plugin.Instance as IArchitectureDetail;
                this.ArchitectureDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ArchitectureDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.ArchitectureDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("FactionTechniquesPlugin");
            if ((plugin != null) && (plugin.Instance is IFactionTechniques))
            {
                this.FactionTechniquesPlugin = plugin.Instance as IFactionTechniques;
                this.FactionTechniquesPlugin.SetScreen(screen);
                this.FactionTechniquesPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.FactionTechniquesPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TreasureDetailPlugin");
            if ((plugin != null) && (plugin.Instance is ITreasureDetail))
            {
                this.TreasureDetailPlugin = plugin.Instance as ITreasureDetail;
                this.TreasureDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TreasureDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.TreasureDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ConmentTextPlugin");
            if ((plugin != null) && (plugin.Instance is IConmentText))
            {
                this.ConmentTextPlugin = plugin.Instance as IConmentText;
                this.ConmentTextPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ConmentTextPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ArchitectureSurveyPlugin");
            if ((plugin != null) && (plugin.Instance is IArchitectureSurvey))
            {
                this.ArchitectureSurveyPlugin = plugin.Instance as IArchitectureSurvey;
                this.ArchitectureSurveyPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ArchitectureSurveyPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopSurveyPlugin");
            if ((plugin != null) && (plugin.Instance is ITroopSurvey))
            {
                this.TroopSurveyPlugin = plugin.Instance as ITroopSurvey;
                this.TroopSurveyPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.TroopSurveyPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ContextMenuPlugin");
            if ((plugin != null) && (plugin.Instance is IGameContextMenu))
            {
                this.ContextMenuPlugin = plugin.Instance as IGameContextMenu;
                this.ContextMenuPlugin.SetScreen(screen);
                this.ContextMenuPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ContextMenuPlugin.SetIHelp(this.HelpPlugin);
                screen.PluginList.Add(this.ContextMenuPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("GameFramePlugin");
            if ((plugin != null) && (plugin.Instance is IGameFrame))
            {
                this.GameFramePlugin = plugin.Instance as IGameFrame;
                this.GameFramePlugin.SetScreen(screen);
                this.GameFramePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.GameFramePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ScreenBlindPlugin");
            if ((plugin != null) && (plugin.Instance is IScreenBlind))
            {
                this.ScreenBlindPlugin = plugin.Instance as IScreenBlind;
                this.ScreenBlindPlugin.SetScreen(screen);
                this.ScreenBlindPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ScreenBlindPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("MapViewSelectorPlugin");
            if ((plugin != null) && (plugin.Instance is IMapViewSelector))
            {
                this.MapViewSelectorPlugin = plugin.Instance as IMapViewSelector;
                this.MapViewSelectorPlugin.SetScreen(screen);
                this.MapViewSelectorPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.MapViewSelectorPlugin.SetGameFrame(this.GameFramePlugin);
                screen.PluginList.Add(this.MapViewSelectorPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TabListPlugin");
            if ((plugin != null) && (plugin.Instance is ITabList))
            {
                this.TabListPlugin = plugin.Instance as ITabList;
                this.TabListPlugin.SetScreen(screen);
                this.TabListPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TabListPlugin.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.TabListPlugin.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.TabListPlugin.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.TabListPlugin.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.TabListPlugin.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.TabListPlugin.SetGameFrame(this.GameFramePlugin);
                this.TabListPlugin.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.TabListPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("OptionDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IOptionDialog))
            {
                this.OptionDialogPlugin = plugin.Instance as IOptionDialog;
                this.OptionDialogPlugin.SetScreen(screen);
                this.OptionDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.OptionDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("SimpleTextDialogPlugin");
            if ((plugin != null) && (plugin.Instance is ISimpleTextDialog))
            {
                this.SimpleTextDialogPlugin = plugin.Instance as ISimpleTextDialog;
                this.SimpleTextDialogPlugin.SetScreen(screen);
                this.SimpleTextDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.SimpleTextDialogPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("tupianwenziPlugin");
            if ((plugin != null) && (plugin.Instance is Itupianwenzi))
            {
                this.tupianwenziPlugin = plugin.Instance as Itupianwenzi;
                this.tupianwenziPlugin.SetScreen(screen);
                this.tupianwenziPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.tupianwenziPlugin.SetContextMenu(this.ContextMenuPlugin);
                screen.PluginList.Add(this.tupianwenziPlugin.Instance as GameObject);
            }



            plugin = Plugin.Plugins.AvailablePlugins.Find("ConfirmationDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IConfirmationDialog))
            {
                this.ConfirmationDialogPlugin = plugin.Instance as IConfirmationDialog;
                this.ConfirmationDialogPlugin.SetScreen(screen);
                this.ConfirmationDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ConfirmationDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ToolBarPlugin");
            if ((plugin != null) && (plugin.Instance is IToolBar))
            {
                this.ToolBarPlugin = plugin.Instance as IToolBar;
                this.ToolBarPlugin.SetScreen(screen);
                this.ToolBarPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ToolBarPlugin.SetContextMenuPlugin(this.ContextMenuPlugin);
                screen.PluginList.Add(this.ToolBarPlugin.Instance as GameObject);
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("DateRunnerPlugin");
                if ((plugin != null) && (plugin.Instance is IDateRunner))
                {
                    this.DateRunnerPlugin = plugin.Instance as IDateRunner;
                    this.DateRunnerPlugin.SetScreen(screen);
                    this.DateRunnerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.DateRunnerPlugin.SetGameDate(screen.Scenario.Date);
                    this.ToolBarPlugin.AddTool(this.DateRunnerPlugin.ToolInstance);
                    screen.PluginList.Add(this.DateRunnerPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("GameRecordPlugin");
                if ((plugin != null) && (plugin.Instance is IGameRecord))
                {
                    this.GameRecordPlugin = plugin.Instance as IGameRecord;
                    this.GameRecordPlugin.SetScreen(screen);
                    this.GameRecordPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.GameRecordPlugin.ToolInstance);
                    screen.PluginList.Add(this.GameRecordPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("MapLayerPlugin");
                if ((plugin != null) && (plugin.Instance is IMapLayer))
                {
                    this.MapLayerPlugin = plugin.Instance as IMapLayer;
                    this.MapLayerPlugin.SetScreen(screen);
                    this.MapLayerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.MapLayerPlugin.ToolInstance);
                    screen.PluginList.Add(this.MapLayerPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("GameSystemPlugin");
                if ((plugin != null) && (plugin.Instance is IGameSystem))
                {
                    this.GameSystemPlugin = plugin.Instance as IGameSystem;
                    this.GameSystemPlugin.SetScreen(screen);
                    this.GameSystemPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.GameSystemPlugin.SetOptionDialog(this.OptionDialogPlugin);
                    this.ToolBarPlugin.AddTool(this.GameSystemPlugin.ToolInstance);
                    screen.PluginList.Add(this.GameSystemPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("AirViewPlugin");
                if ((plugin != null) && (plugin.Instance is IAirView))
                {
                    this.AirViewPlugin = plugin.Instance as IAirView;
                    this.AirViewPlugin.SetScreen(screen);
                    this.AirViewPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.AirViewPlugin.ToolInstance);
                    screen.PluginList.Add(this.AirViewPlugin.Instance as GameObject);
                }
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonPortraitPlugin");
            if ((plugin != null) && (plugin.Instance is IPersonPortrait))
            {
                this.PersonPortraitPlugin = plugin.Instance as IPersonPortrait;
                this.PersonPortraitPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.PersonPortraitPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonBubblePlugin");
            if ((plugin != null) && (plugin.Instance is IPersonBubble))
            {
                this.PersonBubblePlugin = plugin.Instance as IPersonBubble;
                this.PersonBubblePlugin.SetScreen(screen);
                this.PersonBubblePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.PersonBubblePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopTitlePlugin");
            if ((plugin != null) && (plugin.Instance is ITroopTitle))
            {
                this.TroopTitlePlugin = plugin.Instance as ITroopTitle;
                this.TroopTitlePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.TroopTitlePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("RoutewayEditorPlugin");
            if ((plugin != null) && (plugin.Instance is IRoutewayEditor))
            {
                this.RoutewayEditorPlugin = plugin.Instance as IRoutewayEditor;
                this.RoutewayEditorPlugin.SetScreen(screen);
                this.RoutewayEditorPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.RoutewayEditorPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("NumberInputerPlugin");
            if ((plugin != null) && (plugin.Instance is INumberInputer))
            {
                this.NumberInputerPlugin = plugin.Instance as INumberInputer;
                this.NumberInputerPlugin.SetScreen(screen);
                this.NumberInputerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.NumberInputerPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TransportDialogPlugin");
            if ((plugin != null) && (plugin.Instance is ITransportDialog))
            {
                this.TransportDialogPlugin = plugin.Instance as ITransportDialog;
                this.TransportDialogPlugin.SetScreen(screen);
                this.TransportDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TransportDialogPlugin.SetGameFrame(this.GameFramePlugin);
                this.TransportDialogPlugin.SetTabList(this.TabListPlugin);
                this.TransportDialogPlugin.SetNumberInputer(this.NumberInputerPlugin);
                screen.PluginList.Add(this.TransportDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("CreateTroopPlugin");
            if ((plugin != null) && (plugin.Instance is ICreateTroop))
            {
                this.CreateTroopPlugin = plugin.Instance as ICreateTroop;
                this.CreateTroopPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.CreateTroopPlugin.SetScreen(screen);
                this.CreateTroopPlugin.SetGameFrame(this.GameFramePlugin);
                this.CreateTroopPlugin.SetTabList(this.TabListPlugin);
                this.CreateTroopPlugin.SetNumberInputer(this.NumberInputerPlugin);
                screen.PluginList.Add(this.CreateTroopPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("MarshalSectionDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IMarshalSectionDialog))
            {
                this.MarshalSectionDialogPlugin = plugin.Instance as IMarshalSectionDialog;
                this.MarshalSectionDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.MarshalSectionDialogPlugin.SetScreen(screen);
                this.MarshalSectionDialogPlugin.SetGameFrame(this.GameFramePlugin);
                this.MarshalSectionDialogPlugin.SetTabList(this.TabListPlugin);
                screen.PluginList.Add(this.MarshalSectionDialogPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("youcelanPlugin");
            if ((plugin != null) && (plugin.Instance is Iyoucelan))
            {
                this.youcelanPlugin = plugin.Instance as Iyoucelan;
                this.youcelanPlugin.SetScreen(screen);
                this.youcelanPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.youcelanPlugin.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.youcelanPlugin.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.youcelanPlugin.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.youcelanPlugin.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.youcelanPlugin.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.youcelanPlugin.SetGameFrame(this.GameFramePlugin);
                this.youcelanPlugin.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.youcelanPlugin.Instance as GameObject);
            }


            plugin = Plugin.Plugins.AvailablePlugins.Find("BianduiLiebiaoChajian");
            if ((plugin != null) && (plugin.Instance is IBianduiLiebiao))
            {
                this.BianduiLiebiao = plugin.Instance as IBianduiLiebiao;
                this.BianduiLiebiao.SetScreen(screen);
                this.BianduiLiebiao.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.BianduiLiebiao.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.BianduiLiebiao.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.BianduiLiebiao.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.BianduiLiebiao.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.BianduiLiebiao.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.BianduiLiebiao.SetGameFrame(this.GameFramePlugin);
                this.BianduiLiebiao.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.BianduiLiebiao.Instance as GameObject);
            }
        }
コード例 #17
0
 public void AddGameSystem(IGameSystem gameSystem)
 {
     _gameSystems.Add(gameSystem);
     gameSystem.OnAddedToGame(this);
 }
コード例 #18
0
ファイル: Engine.cs プロジェクト: LatroAB/UnderRock004
 public void RemoveSystem(IGameSystem system)
 {
     gameSystemList.Remove(system);
     system.SystemEnd();
 }
コード例 #19
0
ファイル: Engine.cs プロジェクト: LatroAB/UnderRock004
 public void AddSystem(IGameSystem system)
 {
     gameSystemList.Add(system);
     system.SystemStart();
 }
コード例 #20
0
        public UISaveableConfirmDialog(IGameSystem gs) : base(gs)
        {
            CancelButton = null;

            btnApply.Click += (s, e) => applyButtonClicked?.Invoke();
        }
コード例 #21
0
 void IGameElement.OnRegistered(IGameSystem system)
 {
     this.GameSystem = system;
     this.State      = GameState.CREATE;
     this.OnRegistered();
 }
コード例 #22
0
        internal void InitializePlugins(Screen screen)
        {
            AvailablePlugin plugin = Plugin.Plugins.AvailablePlugins.Find("HelpPlugin");
            if ((plugin != null) && (plugin.Instance is IHelp))
            {
                this.HelpPlugin = plugin.Instance as IHelp;
                this.HelpPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.HelpPlugin.SetScreen(screen);
                screen.PluginList.Add(this.HelpPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonDetailPlugin");
            if ((plugin != null) && (plugin.Instance is IPersonDetail))
            {
                this.PersonDetailPlugin = plugin.Instance as IPersonDetail;
                this.PersonDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.PersonDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.PersonDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopDetailPlugin");
            if ((plugin != null) && (plugin.Instance is ITroopDetail))
            {
                this.TroopDetailPlugin = plugin.Instance as ITroopDetail;
                this.TroopDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TroopDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.TroopDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ArchitectureDetailPlugin");
            if ((plugin != null) && (plugin.Instance is IArchitectureDetail))
            {
                this.ArchitectureDetailPlugin = plugin.Instance as IArchitectureDetail;
                this.ArchitectureDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ArchitectureDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.ArchitectureDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("FactionTechniquesPlugin");
            if ((plugin != null) && (plugin.Instance is IFactionTechniques))
            {
                this.FactionTechniquesPlugin = plugin.Instance as IFactionTechniques;
                this.FactionTechniquesPlugin.SetScreen(screen);
                this.FactionTechniquesPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.FactionTechniquesPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TreasureDetailPlugin");
            if ((plugin != null) && (plugin.Instance is ITreasureDetail))
            {
                this.TreasureDetailPlugin = plugin.Instance as ITreasureDetail;
                this.TreasureDetailPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TreasureDetailPlugin.SetScreen(screen);
                screen.PluginList.Add(this.TreasureDetailPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ConmentTextPlugin");
            if ((plugin != null) && (plugin.Instance is IConmentText))
            {
                this.ConmentTextPlugin = plugin.Instance as IConmentText;
                this.ConmentTextPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ConmentTextPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ArchitectureSurveyPlugin");
            if ((plugin != null) && (plugin.Instance is IArchitectureSurvey))
            {
                this.ArchitectureSurveyPlugin = plugin.Instance as IArchitectureSurvey;
                this.ArchitectureSurveyPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ArchitectureSurveyPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopSurveyPlugin");
            if ((plugin != null) && (plugin.Instance is ITroopSurvey))
            {
                this.TroopSurveyPlugin = plugin.Instance as ITroopSurvey;
                this.TroopSurveyPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.TroopSurveyPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ContextMenuPlugin");
            if ((plugin != null) && (plugin.Instance is IGameContextMenu))
            {
                this.ContextMenuPlugin = plugin.Instance as IGameContextMenu;
                this.ContextMenuPlugin.SetScreen(screen);
                this.ContextMenuPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ContextMenuPlugin.SetIHelp(this.HelpPlugin);
                screen.PluginList.Add(this.ContextMenuPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("GameFramePlugin");
            if ((plugin != null) && (plugin.Instance is IGameFrame))
            {
                this.GameFramePlugin = plugin.Instance as IGameFrame;
                this.GameFramePlugin.SetScreen(screen);
                this.GameFramePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.GameFramePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ScreenBlindPlugin");
            if ((plugin != null) && (plugin.Instance is IScreenBlind))
            {
                this.ScreenBlindPlugin = plugin.Instance as IScreenBlind;
                this.ScreenBlindPlugin.SetScreen(screen);
                this.ScreenBlindPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ScreenBlindPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("MapViewSelectorPlugin");
            if ((plugin != null) && (plugin.Instance is IMapViewSelector))
            {
                this.MapViewSelectorPlugin = plugin.Instance as IMapViewSelector;
                this.MapViewSelectorPlugin.SetScreen(screen);
                this.MapViewSelectorPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.MapViewSelectorPlugin.SetGameFrame(this.GameFramePlugin);
                screen.PluginList.Add(this.MapViewSelectorPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TabListPlugin");
            if ((plugin != null) && (plugin.Instance is ITabList))
            {
                this.TabListPlugin = plugin.Instance as ITabList;
                this.TabListPlugin.SetScreen(screen);
                this.TabListPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TabListPlugin.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.TabListPlugin.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.TabListPlugin.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.TabListPlugin.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.TabListPlugin.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.TabListPlugin.SetGameFrame(this.GameFramePlugin);
                this.TabListPlugin.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.TabListPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("OptionDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IOptionDialog))
            {
                this.OptionDialogPlugin = plugin.Instance as IOptionDialog;
                this.OptionDialogPlugin.SetScreen(screen);
                this.OptionDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.OptionDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("SimpleTextDialogPlugin");
            if ((plugin != null) && (plugin.Instance is ISimpleTextDialog))
            {
                this.SimpleTextDialogPlugin = plugin.Instance as ISimpleTextDialog;
                this.SimpleTextDialogPlugin.SetScreen(screen);
                this.SimpleTextDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.SimpleTextDialogPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("tupianwenziPlugin");
            if ((plugin != null) && (plugin.Instance is Itupianwenzi))
            {
                this.tupianwenziPlugin = plugin.Instance as Itupianwenzi;
                this.tupianwenziPlugin.SetScreen(screen);
                this.tupianwenziPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.tupianwenziPlugin.SetContextMenu(this.ContextMenuPlugin);
                screen.PluginList.Add(this.tupianwenziPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("ConfirmationDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IConfirmationDialog))
            {
                this.ConfirmationDialogPlugin = plugin.Instance as IConfirmationDialog;
                this.ConfirmationDialogPlugin.SetScreen(screen);
                this.ConfirmationDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.ConfirmationDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("ToolBarPlugin");
            if ((plugin != null) && (plugin.Instance is IToolBar))
            {
                this.ToolBarPlugin = plugin.Instance as IToolBar;
                this.ToolBarPlugin.SetScreen(screen);
                this.ToolBarPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.ToolBarPlugin.SetContextMenuPlugin(this.ContextMenuPlugin);
                screen.PluginList.Add(this.ToolBarPlugin.Instance as GameObject);
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("DateRunnerPlugin");
                if ((plugin != null) && (plugin.Instance is IDateRunner))
                {
                    this.DateRunnerPlugin = plugin.Instance as IDateRunner;
                    this.DateRunnerPlugin.SetScreen(screen);
                    this.DateRunnerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.DateRunnerPlugin.SetGameDate(screen.Scenario.Date);
                    this.ToolBarPlugin.AddTool(this.DateRunnerPlugin.ToolInstance);
                    screen.PluginList.Add(this.DateRunnerPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("GameRecordPlugin");
                if ((plugin != null) && (plugin.Instance is IGameRecord))
                {
                    this.GameRecordPlugin = plugin.Instance as IGameRecord;
                    this.GameRecordPlugin.SetScreen(screen);
                    this.GameRecordPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.GameRecordPlugin.ToolInstance);
                    screen.PluginList.Add(this.GameRecordPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("MapLayerPlugin");
                if ((plugin != null) && (plugin.Instance is IMapLayer))
                {
                    this.MapLayerPlugin = plugin.Instance as IMapLayer;
                    this.MapLayerPlugin.SetScreen(screen);
                    this.MapLayerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.MapLayerPlugin.ToolInstance);
                    screen.PluginList.Add(this.MapLayerPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("GameSystemPlugin");
                if ((plugin != null) && (plugin.Instance is IGameSystem))
                {
                    this.GameSystemPlugin = plugin.Instance as IGameSystem;
                    this.GameSystemPlugin.SetScreen(screen);
                    this.GameSystemPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.GameSystemPlugin.SetOptionDialog(this.OptionDialogPlugin);
                    this.ToolBarPlugin.AddTool(this.GameSystemPlugin.ToolInstance);
                    screen.PluginList.Add(this.GameSystemPlugin.Instance as GameObject);
                }
            }
            if (this.ToolBarPlugin != null)
            {
                plugin = Plugin.Plugins.AvailablePlugins.Find("AirViewPlugin");
                if ((plugin != null) && (plugin.Instance is IAirView))
                {
                    this.AirViewPlugin = plugin.Instance as IAirView;
                    this.AirViewPlugin.SetScreen(screen);
                    this.AirViewPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                    this.ToolBarPlugin.AddTool(this.AirViewPlugin.ToolInstance);
                    screen.PluginList.Add(this.AirViewPlugin.Instance as GameObject);
                }
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonPortraitPlugin");
            if ((plugin != null) && (plugin.Instance is IPersonPortrait))
            {
                this.PersonPortraitPlugin = plugin.Instance as IPersonPortrait;
                this.PersonPortraitPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.PersonPortraitPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("PersonBubblePlugin");
            if ((plugin != null) && (plugin.Instance is IPersonBubble))
            {
                this.PersonBubblePlugin = plugin.Instance as IPersonBubble;
                this.PersonBubblePlugin.SetScreen(screen);
                this.PersonBubblePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.PersonBubblePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TroopTitlePlugin");
            if ((plugin != null) && (plugin.Instance is ITroopTitle))
            {
                this.TroopTitlePlugin = plugin.Instance as ITroopTitle;
                this.TroopTitlePlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.TroopTitlePlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("RoutewayEditorPlugin");
            if ((plugin != null) && (plugin.Instance is IRoutewayEditor))
            {
                this.RoutewayEditorPlugin = plugin.Instance as IRoutewayEditor;
                this.RoutewayEditorPlugin.SetScreen(screen);
                this.RoutewayEditorPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.RoutewayEditorPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("NumberInputerPlugin");
            if ((plugin != null) && (plugin.Instance is INumberInputer))
            {
                this.NumberInputerPlugin = plugin.Instance as INumberInputer;
                this.NumberInputerPlugin.SetScreen(screen);
                this.NumberInputerPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                screen.PluginList.Add(this.NumberInputerPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("TransportDialogPlugin");
            if ((plugin != null) && (plugin.Instance is ITransportDialog))
            {
                this.TransportDialogPlugin = plugin.Instance as ITransportDialog;
                this.TransportDialogPlugin.SetScreen(screen);
                this.TransportDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.TransportDialogPlugin.SetGameFrame(this.GameFramePlugin);
                this.TransportDialogPlugin.SetTabList(this.TabListPlugin);
                this.TransportDialogPlugin.SetNumberInputer(this.NumberInputerPlugin);
                screen.PluginList.Add(this.TransportDialogPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("CreateTroopPlugin");
            if ((plugin != null) && (plugin.Instance is ICreateTroop))
            {
                this.CreateTroopPlugin = plugin.Instance as ICreateTroop;
                this.CreateTroopPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.CreateTroopPlugin.SetScreen(screen);
                this.CreateTroopPlugin.SetGameFrame(this.GameFramePlugin);
                this.CreateTroopPlugin.SetTabList(this.TabListPlugin);
                this.CreateTroopPlugin.SetNumberInputer(this.NumberInputerPlugin);
                screen.PluginList.Add(this.CreateTroopPlugin.Instance as GameObject);
            }
            plugin = Plugin.Plugins.AvailablePlugins.Find("MarshalSectionDialogPlugin");
            if ((plugin != null) && (plugin.Instance is IMarshalSectionDialog))
            {
                this.MarshalSectionDialogPlugin = plugin.Instance as IMarshalSectionDialog;
                this.MarshalSectionDialogPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.MarshalSectionDialogPlugin.SetScreen(screen);
                this.MarshalSectionDialogPlugin.SetGameFrame(this.GameFramePlugin);
                this.MarshalSectionDialogPlugin.SetTabList(this.TabListPlugin);
                screen.PluginList.Add(this.MarshalSectionDialogPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("youcelanPlugin");
            if ((plugin != null) && (plugin.Instance is Iyoucelan))
            {
                this.youcelanPlugin = plugin.Instance as Iyoucelan;
                this.youcelanPlugin.SetScreen(screen);
                this.youcelanPlugin.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.youcelanPlugin.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.youcelanPlugin.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.youcelanPlugin.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.youcelanPlugin.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.youcelanPlugin.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.youcelanPlugin.SetGameFrame(this.GameFramePlugin);
                this.youcelanPlugin.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.youcelanPlugin.Instance as GameObject);
            }

            plugin = Plugin.Plugins.AvailablePlugins.Find("BianduiLiebiaoChajian");
            if ((plugin != null) && (plugin.Instance is IBianduiLiebiao))
            {
                this.BianduiLiebiao  = plugin.Instance as IBianduiLiebiao;
                this.BianduiLiebiao.SetScreen(screen);
                this.BianduiLiebiao.SetGraphicsDevice(screen.spriteBatch.GraphicsDevice);
                this.BianduiLiebiao.SetPersonDetailDialog(this.PersonDetailPlugin);
                this.BianduiLiebiao.SetTroopDetailDialog(this.TroopDetailPlugin);
                this.BianduiLiebiao.SetArchitectureDetailDialog(this.ArchitectureDetailPlugin);
                this.BianduiLiebiao.SetFactionTechniquesDialog(this.FactionTechniquesPlugin);
                this.BianduiLiebiao.SetTreasureDetailDialog(this.TreasureDetailPlugin);
                this.BianduiLiebiao.SetGameFrame(this.GameFramePlugin);
                this.BianduiLiebiao.SetMapViewSelector(this.MapViewSelectorPlugin);
                screen.PluginList.Add(this.BianduiLiebiao.Instance as GameObject);
            }
        }
コード例 #23
0
 public UICommandWindow(IGameSystem gs) : base(gs)
 {
 }