Ejemplo n.º 1
0
        public AnimSequence Add(string name, string frames, int fps)
        {
            AnimSequence seq = new AnimSequence(name, frames, fps);

            this.Add(seq);
            return(seq);
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
 public AnimSequence Add(AnimSequence seq)
 {
     sequences.Add(seq);
     UpdateCache();
     return(seq);
 }
Ejemplo n.º 5
0
 // Stops and clears the playing animation
 public void Clear()
 {
     sequence  = null;
     sr.sprite = null;
 }