Ejemplo n.º 1
0
        public void Set(SpriteAnimation.Name animationName, Sprite.Name spriteName)
        {
            this.name = animationName;

            // Find the sprite that the animation is attached to
            this.pSprite = SpriteManager.Find(spriteName);
            Debug.Assert(this.pSprite != null);
        }
Ejemplo n.º 2
0
        public SpriteAnimation(SpriteAnimation.Name animationName, Sprite.Name spriteName)
        {
            // list
            this.pFirstImage = null;
            this.pCurrImage  = null;

            Set(animationName, spriteName);
        }
        public static SpriteAnimation Find(SpriteAnimation.Name name)
        {
            SpriteAnimationManager pInstance = SpriteAnimationManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            // Use compare node to compare to search nodes
            pInstance.poNodeCompare.SetName(name);

            SpriteAnimation pData = (SpriteAnimation)pInstance.BaseFind(pInstance.poNodeCompare);

            return(pData);
        }
        public static SpriteAnimation Add(SpriteAnimation.Name animationName, Sprite.Name spriteName)
        {
            SpriteAnimationManager pMan = SpriteAnimationManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            SpriteAnimation pNode = (SpriteAnimation)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(animationName, spriteName);
            return(pNode);
        }
Ejemplo n.º 5
0
 public void SetName(SpriteAnimation.Name name)
 {
     this.name = name;
 }