Пример #1
0
        public ExtHomeType(ExtStaticData extStaticData, WCFHomeType wcfHomeType, List <ExtHomeCardType> homeCard)
        {
            WCFHomeType = wcfHomeType;

            ExtTerrain             = extStaticData.Terrain.Single(p => p.WCFTerrain.Name == WCFHomeType.Terrain);
            ExtTerrain.ExtHomeType = this;//TODO даёт ссылку на себя для родовой земли (Обратная связь)

            Position = this.ExtTerrain.ExtTokenPoint.Single(p => p.WCFTokenPoint.TokenType == "Жетон_власти").WCFGamePoint;

            switch (Key)
            {
            case "baratheon": Sort = 0; HomeColor = new SolidColorBrush(Colors.Yellow)
            {
                    Opacity = 0.25
            }; break;

            case "lannister": Sort = 1; HomeColor = new SolidColorBrush(Colors.Red)
            {
                    Opacity = 0.25
            }; break;

            case "stark": Sort = 2; HomeColor = new SolidColorBrush(Colors.White)
            {
                    Opacity = 0.25
            }; break;

            case "martell": Sort = 3; HomeColor = new SolidColorBrush(Colors.Orange)
            {
                    Opacity = 0.25
            }; break;

            case "greyjoy": Sort = 4; HomeColor = new SolidColorBrush(Colors.Black)
            {
                    Opacity = 0.25
            }; break;

            case "tyrell": Sort = 5; HomeColor = new SolidColorBrush(Colors.Green)
            {
                    Opacity = 0.25
            }; break;

            case "bolton": Sort = 2; HomeColor = new SolidColorBrush(Colors.Purple)
            {
                    Opacity = 0.25
            }; break;
            }

            Name               = App.GetResources("homeType_" + WCFHomeType.Name);
            ImageName          = string.Format("/Image/{0}/{0}.png", Key);
            SupplyImageName    = ImageName;
            VictoryImageName   = string.Format("/Image/{0}/{0}_victory.png", Key);
            InfluenceImageName = string.Format("/Image/{0}/{0}_influence.png", Key);
            HomeCardBackName   = string.Format("/Image/{0}/{0}_back.png", Key);
            UnitImageFormate   = string.Format("/Image/{0}/{0}_{1}", Key, "{0}.png");
            HomeCard           = homeCard;

            ClientInfo.ClientGameChanging += ClientInfo_ClientGameChanging;
        }
Пример #2
0
        public ExtSymbolic(ExtStaticData extStaticData, WCFSymbolic wcfSymbolic)
        {
            WCFSymbolic = wcfSymbolic;

            ObjectPoint = extStaticData.ObjectPoint.Where(p => p.WCFObjectPoint.Symbolic == WCFSymbolic.Name);
            ObjectPoint = ObjectPoint.OrderBy(p => p.WCFObjectPoint.Sort).ToList();

            Points = new PointCollection(this.ObjectPoint.Select(p => new Point(p.GamePoint.X, p.GamePoint.Y)));

            Opacity    = 0.66;
            Background = _DefaultBackground;

            ClientInfo.ClientGameChanging += ClientInfo_ClientGameChanging;
        }
Пример #3
0
        public ExtTerrain(ExtStaticData extStaticData, WCFTerrain wcfTerrain)
        {
            WCFTerrain     = wcfTerrain;
            JoinTerrainCol = new List <ExtTerrain>();

            ObjectPoint = extStaticData.ObjectPoint.Where(p => p.WCFObjectPoint.Terrain == WCFTerrain.Name);
            ObjectPoint = ObjectPoint.OrderBy(p => p.WCFObjectPoint.Sort).ToList();

            Points = new PointCollection(this.ObjectPoint.Select(p => new Point(p.GamePoint.X, p.GamePoint.Y)));

            ExtTokenPoint = extStaticData.TokenPoint.Where(p => p.WCFTokenPoint.Terrain == WCFTerrain.Name).ToList();
            Name          = App.GetResources("terrain_" + WCFTerrain.Name);

            ClientInfo.ClientGameChanging += ClientInfo_ClientGameChanging;
        }