Exemplo n.º 1
0
        public AnimationPath CreateAnimationPath(int pInsertionIndex)
        {
            AnimationPaths.Insert(pInsertionIndex, new AnimationPath());

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

            return(AnimationPaths[pInsertionIndex]);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void ClearAnimations()
 {
     _currentPath = null;
     AnimationPaths.Clear();
 }
Exemplo n.º 4
0
 public AnimationContainer()
 {
     AnimationPaths = new List <AnimationPath>();
     _currentPath   = null;
 }