public AnimSequence Add(string name, string frames, int fps) { AnimSequence seq = new AnimSequence(name, frames, fps); this.Add(seq); return(seq); }
public void Play(string name) { if (!cache.ContainsKey(name)) { Debug.Log("Unknown sequence name: " + name); return; } sequence = cache[name]; sequenceName = name; frame = 0; elapsed = 0; paused = false; UpdateView(); }
public void Replay(string name, bool startPaused = false) { if (name == null || name == "") { Clear(); return; } if (!IsCached(name)) { Debug.Log(transform.GetFullPath() + "<Anim> cache failed hit for sequence name: " + name); return; } sequence = cache[name]; sequenceName = name; frame = 0; elapsed = 0; paused = startPaused; UpdateView(); }
public AnimSequence Add(AnimSequence seq) { sequences.Add(seq); UpdateCache(); return(seq); }
// Stops and clears the playing animation public void Clear() { sequence = null; sr.sprite = null; }