public void AddAnimation(string name, string texture) { AnimatedTexture tex = TextureManager.GetAnimation(texture); if (tex == null) { Debug.PrintError("Could not find texture: ", texture); return; } textures.Add(name, tex as AnimatedTexture); }
public void PlayAnimation(string name, float rate) { if (!textures.ContainsKey(name)) { Debug.PrintError("Could not find animation: ", name); return; } current = textures[name]; currentName = name; speed = rate; frame = 0; origin = current.Origin(); }
public CAnimatedSprite() : base() { textures = new Dictionary <string, AnimatedTexture>(); current = null; currentName = ""; }