コード例 #1
0
ファイル: GuardSpawner.cs プロジェクト: chrisforbes/aliengame
 public GuardSpawner(Model m, XmlElement e)
     : base(m, e)
 {
     NumGuards = e.GetAttributeInt("numguards", 2);
     MaxGuards = e.GetAttributeInt("maxguards", 2);
     RespawnRate = e.GetAttributeFloat("respawnrate", 0);
 }
コード例 #2
0
ファイル: Actor.cs プロジェクト: chrisforbes/aliengame
 protected Actor(Model m, XmlElement e)
 {
     this.m = m;
     Position = new Point(e.GetAttributeInt("x", 0),
                          e.GetAttributeInt("y", 0));
     Direction = e.GetAttributeInt("dir", 0);
     Name = e.GetAttribute("name");
 }
コード例 #3
0
ファイル: Brush.cs プロジェクト: chrisforbes/aliengame
        public Brush(XmlElement e)
        {
            Bounds = Rectangle.FromLTRB(
                e.GetAttributeInt("left", 0),
                e.GetAttributeInt("top", 0),
                e.GetAttributeInt("right", 0),
                e.GetAttributeInt("bottom", 0));

            Content = e.GetAttributeInt("content", 0);
        }
コード例 #4
0
// メソッド

		public void Load(HatomaruManager manager, XmlElement contentElement){
			string path = contentElement.GetAttribute(HatomaruReputation.UriAttributeName);
			Path = new AbsPath(path);
			Count = contentElement.GetAttributeInt(HatomaruReputation.CountAttributeName);
			Description = contentElement[HatomaruReputation.DescriptionElementName];

			Title = manager.GetResponseTitle(Path);

		}
コード例 #5
0
ファイル: extinfo.cs プロジェクト: bakera/Hatomaru.dll
// パブリックメソッド

		public void LoadXml(XmlElement e){
			Name = e.GetAttributeValue(ExtInfoName);
			ContentType = e.GetAttributeValue(ExtInfoType);
			Charset = e.GetAttributeValue(ExtInfoCharset);
			Description = e.InnerText;

			string tempDisposition = e.GetAttributeValue(ExtInfoDisposition);
			if(!string.IsNullOrEmpty(tempDisposition)) Disposition = true;

			int maxAgeDays = e.GetAttributeInt(ExtInfoMaxAge);
			MaxAge = new TimeSpan(maxAgeDays, 0, 0, 0);
		}
コード例 #6
0
        public void LoadTradeSettings(XmlElement node)
        {
            if (node == null) return;
            var tradeAuto = node.GetAttributeBool("tradeAuto");
            if (tradeAuto.HasValue)
                TradeAuto = tradeAuto.Value;

            MaxLeverage = node.GetAttributeDouble("maxLeverage");
            PercentLeverage = node.GetAttributeInt("percentLeverage") ?? 100;
            HedgingOrdersEnabled = node.GetAttributeBool("hedgingOrdersEnabled");
            FixedVolume = node.GetAttributeInt("fixedVolume");
            if (node.Attributes["volumeRound"] != null)
            {
                VolumeRoundType volRnd;
                VolumeRound = Enum.TryParse(node.Attributes["volumeRound"].Value, out volRnd)
                                  ? volRnd
                                  : (VolumeRoundType?)null;
            }
            MinVolume = node.GetAttributeInt("minVolume");
            MaxVolume = node.GetAttributeInt("maxVolume");
            StepVolume = node.GetAttributeInt("stepVolume");
            TargetAccount = node.GetAttributeInt("targetAccount");
        }
コード例 #7
0
ファイル: Door.cs プロジェクト: chrisforbes/aliengame
 public Door(XmlElement e)
 {
     Position = new Point(e.GetAttributeInt("x", 0), e.GetAttributeInt("y", 0));
     Kind = e.GetAttributeInt("kind", 0);
     State = e.GetAttributeInt("state", 0);
 }