Exemplo n.º 1
0
 public static AnimatedSprite CreateFromData(CharacterAnimatedSpriteData data)
 {
     AnimatedSprite sprite = new AnimatedSprite(data.totalFrames, data.textureFileName, data.fps);
     return sprite;
 }
Exemplo n.º 2
0
        public static AnimatedSpriteData ConvertToData(AnimatedSprite animatedSprite)
        {
            AnimatedSpriteData data = new AnimatedSpriteData();

            data.textureFileName = animatedSprite.texture.Name;
            data.totalFrames = animatedSprite.totalFrames;
            data.fps = animatedSprite.fps;

            return data;
        }