internal AnimationData(string name, AnimatorMode mode, float interval, int[] frames) { Name = name; Mode = mode; Interval = interval; Frames = frames; }
private EntityData AddAnim(string name, AnimatorMode mode, float interval, params int[] frames) { if (Anim == null) { Anim = new AnimatorData("entities_16_16"); } Anim.Add(name, mode, interval, frames); return(this); }
public void Add(string name, AnimatorMode mode, float interval, params int[] frames) { if (animations.ContainsKey(name)) { throw new Exception("Animation '" + name + "' already exists."); } if (frames.Length == 0) { throw new Exception("Animation must have at least one frame."); } animations.Add(name, new AnimationData(name, mode, interval, frames)); }
public void Add(string name, AnimatorMode mode, float frameRate, params int[] frames) { data.Add(name, mode, frameRate, frames); }