示例#1
0
        public bool TryGet(string animationName, out AnimationData animationData)
        {
            animationData = null;

            if (!Contaion(animationName))
                return false;

            animationData = list[animationName];
            return true;
        }
示例#2
0
        private void AnimationNode(XmlNode node)
        {
            AnimationData ad = new AnimationData();
            foreach (XmlNode child in node.ChildNodes)
            {
                string name = XmlHelper.GetAttribute(child, "name");
                if (!string.IsNullOrEmpty(name))
                {
                    string value = XmlHelper.GetAttribute(child, "value");
                    switch (name.ToLower())
                    {
                        case "name":
                            ad.Name = value;
                            break;
                        case "start":
                            ad.Start = XmlHelper.GetInt(value);
                            break;
                        case "end":
                            ad.End = XmlHelper.GetInt(value);
                            break;
                        case "speed":
                            ad.Speed = XmlHelper.GetInt(value);
                            break;
                    }
                }
            }

            if (!string.IsNullOrEmpty(ad.Name))
                list.Add(ad.Name, ad);
        }
示例#3
0
 public bool TryGet(AnimationType animationType, out AnimationData animationData)
 {
     return TryGet(animationType.ToString().ToLower(), out animationData);
 }