Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using DG.Tweening;
  4. using System.Collections.Generic;
  5.  
  6. public class TweenStackHandler
  7. {
  8.     public bool nowPlaying=false;
  9.     Queue<Sequence>  queue = new Queue<Sequence>();
  10.    
  11.     public void doAct() {
  12.  
  13.         nowPlaying = false;
  14.         if (queue.Count > 0)
  15.         {
  16.        
  17.             queue.Dequeue().AppendCallback(doAct).Play();
  18.             nowPlaying = true;
  19.         }
  20.     }
  21.     public void add(Sequence sequance){
  22.         queue.Enqueue(sequance);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement