示例#1
0
        public AnimationPath CreateAnimationPath(int pInsertionIndex)
        {
            AnimationPaths.Insert(pInsertionIndex, new AnimationPath());

            if (_currentPath == null)
            {
                _currentPath = AnimationPaths[0];
            }

            return(AnimationPaths[pInsertionIndex]);
        }
示例#2
0
        public void ApplySkin(XmlNode pSkinNode, string pSkinPath)
        {
            base.ApplySkin(pSkinNode, pSkinPath);
            ClearAnimations();
            AnimationPath path = this.CreateAnimationPath();

            foreach (XmlNode pointNode in pSkinNode.SelectNodes(XPATH_ANIMATION_POINT))
            {
                AnimationPathPoint point = XmlHelper.GetAnimationPathPoint(pointNode.InnerText);
                if (path.AnimationPointCount == 0)
                {
                    SetLocation(point.Location);
                }
                path.AddAnimationPoint(point);
            }
            this.SetAnimation(-1);
        }
示例#3
0
 public void ClearAnimations()
 {
     _currentPath = null;
     AnimationPaths.Clear();
 }
示例#4
0
 public AnimationContainer()
 {
     AnimationPaths = new List <AnimationPath>();
     _currentPath   = null;
 }