当前位置: 首页>>代码示例>>C#>>正文


C# AnimatedSprite.xmlImport方法代码示例

本文整理汇总了C#中AnimatedSprite.xmlImport方法的典型用法代码示例。如果您正苦于以下问题:C# AnimatedSprite.xmlImport方法的具体用法?C# AnimatedSprite.xmlImport怎么用?C# AnimatedSprite.xmlImport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AnimatedSprite的用法示例。


在下文中一共展示了AnimatedSprite.xmlImport方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: xmlImport

 public new void xmlImport(XmlReader xml_Reader, ContentManager Content)
 {
     //lPsycheQueue.Clear();
     while (xml_Reader.Read())
     {
         String attrib;
         //Console.WriteLine("Player : " + xml_Reader.Name);
         switch (xml_Reader.Name)
         {
             case "Variables":
                 //attrib = xml_Reader["PsycheMax"];
                 //if (attrib != null) { iPsycheMax = int.Parse(attrib); }
                 attrib = xml_Reader["ItemPickupRange"];
                 if (attrib != null) { fItemPickupRange = float.Parse(attrib); }
                 attrib = xml_Reader["ShieldDuration"];
                 if (attrib != null) { fShieldDuration = float.Parse(attrib); }
                 attrib = xml_Reader["HealAmount"];
                 if (attrib != null) { fHealAmount = float.Parse(attrib); }
                 attrib = xml_Reader["HealDuration"];
                 if (attrib != null) { fHealDuration = float.Parse(attrib); }
                 attrib = xml_Reader["InvisibleAmount"];
                 if (attrib != null) { fInvisibleAmount = float.Parse(attrib); }
                 attrib = xml_Reader["InvisibleDuration"];
                 if (attrib != null) { fInvisibleDuration = float.Parse(attrib); }
                 attrib = xml_Reader["Sound_AttackSwing"];
                 if (attrib != null) { Content.Load<SoundEffect>(attrib); }
                 break;
             case "Weapon":
                 wWeapon = new Items.Weapon();
                 wWeapon.xmlImport(xml_Reader, Content);
                 break;
             //case "Psyche":
             //if (lPsycheQueue.Count < iPsycheMax)
             //{
             //    Items.Psyche p = new Items.Psyche();
             //    p.xmlImport(xml_Reader, Content);
             //    lPsycheQueue.Add(p);
             //}
             //break;
             case "AnimatedSprite":
                 asAttackSprite = new AnimatedSprite();
                 asAttackSprite.xmlImport(xml_Reader, Content);
                 break;
             case "Entity":
                 base.xmlImport(xml_Reader, Content);
                 break;
             case "Player":
                 return;
         }
     }
 }
开发者ID:ChocMaltHoney,项目名称:Neuroleptic,代码行数:51,代码来源:Player.cs


注:本文中的AnimatedSprite.xmlImport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。