Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }