Exemplo n.º 1
0
        protected override void Initialize(XElement extensionElement, GamePack package)
        {
            XElement canPass =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(PassableTileTypesElement));

            PassableTileTypes = ViableTileTypes.FromXml(canPass, package);
        }
Exemplo n.º 2
0
        protected override void Initialize(XElement extensionElement, GamePack package)
        {
            XElement costElem = extensionElement.Element(package.PackageManager.GetQualifiedXName(CostElement));

            cost = Cost.FromXml(costElem, package);

            XElement canPass =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(PassableTileTypesElement));

            PassableTileTypes = ViableTileTypes.FromXml(canPass, package);

            myType = package.GetUnitType(ID);
        }
Exemplo n.º 3
0
Arquivo: Keep.cs Projeto: MK4H/MHUrho
        protected override void Initialize(XElement extensionElement, GamePack package)
        {
            MyTypeInstance = package.GetBuildingType(ID);

            XElement canBuildOnElem =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(CanBuildOnElement));

            ViableTileTypes = ViableTileTypes.FromXml(canBuildOnElem, package);

            XElement producedResourceElem =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(ProducedResourceElement));

            ProducedResource = package.GetResourceType(producedResourceElem.Value);
            ProductionRate   = double.Parse(producedResourceElem.Attribute(ProductionRateAttribute).Value);
        }
Exemplo n.º 4
0
        protected override void Initialize(XElement extensionElement, GamePack package)
        {
            MyTypeInstance = package.GetBuildingType(TypeID);

            XElement workerElement = extensionElement.Element(package.PackageManager.GetQualifiedXName(WorkerElement));

            WorkerType = package.GetUnitType(workerElement.Value);

            XElement resourceElement =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(ResourceElement));

            ProducedResource = package.GetResourceType(resourceElement.Value);

            XElement costElem = extensionElement.Element(package.PackageManager.GetQualifiedXName(CostElement));

            Cost = Cost.FromXml(costElem, package);

            XElement canBuildOnElem =
                extensionElement.Element(package.PackageManager.GetQualifiedXName(CanBuildOnElement));

            ViableTileTypes = ViableTileTypes.FromXml(canBuildOnElem, package);
        }