コード例 #1
0
ファイル: GuiManager.cs プロジェクト: hakanaku2009/svn-dump
        private void ShowTowerInfo(ITower tower)
        {
            if (TowerWindow != null)
            {
                TowerWindow.Close();
                manager.Remove(TowerWindow);
                TowerWindow = null;
            }
            TowerWindow             = new TowerInfoWindow(manager, CurrGame, GamePlayScreen);
            TowerWindow.Closed     += delegate { TowerWindow = null; };
            TowerWindow.Tower       = tower;
            TowerWindow.DesiredLeft = (int)(tower.Position.X + tower.Size.X / 2);
            TowerWindow.DesiredTop  = (int)(tower.Position.Y + tower.Size.Y / 2);
            bool showDamage   = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowDamage"));
            bool showRange    = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowRange"));
            bool showInterval = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowInterval"));

            DebugLog("ShowTowerInfo: " + tower.Key);

            TowerWindow.Init(showDamage, showRange, showInterval);
            TowerWindow.Show();
            TowerWindow.BringToFront();
        }
コード例 #2
0
ファイル: GuiManager.cs プロジェクト: GodLesZ/svn-dump
        private void ShowTowerInfo(ITower tower)
        {
            if (TowerWindow != null)
            {
                TowerWindow.Close();
                manager.Remove(TowerWindow);
                TowerWindow = null;
            }
            TowerWindow = new TowerInfoWindow(manager, CurrGame, GamePlayScreen);
            TowerWindow.Closed += delegate { TowerWindow = null; };
            TowerWindow.Tower = tower;
            TowerWindow.DesiredLeft = (int)(tower.Position.X + tower.Size.X / 2);
            TowerWindow.DesiredTop = (int)(tower.Position.Y + tower.Size.Y / 2);
            bool showDamage = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowDamage"));
            bool showRange = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowRange"));
            bool showInterval = bool.Parse(TowerManager.GetTowerProperty("Labels", tower.Key, "ShowInterval"));

            DebugLog("ShowTowerInfo: " + tower.Key);

            TowerWindow.Init(showDamage, showRange, showInterval);
            TowerWindow.Show();
            TowerWindow.BringToFront();
        }