17 return EMono.player.queues;
22 private void OnEnable()
24 UIQueue.Instance =
this;
28 private void OnDisable()
30 UIQueue.Instance =
null;
34 public void OnAdd(
Queue q,
bool insert =
false)
36 UIButton uibutton = q.button = Util.Instantiate<UIButton>(this.mold, this.layout);
37 uibutton.onClick.AddListener(delegate()
41 this.queues.Cancel(q);
46 uibutton.transform.SetAsFirstSibling();
48 uibutton.tooltip.onShowTooltip = delegate(UITooltip a)
50 string text = q.interaction.GetType().ToString() +
"\n";
51 text += q.interaction.status.ToString();
52 a.textMain.SetText(text);
54 uibutton.transform.DOScale(0f, 0.2f).From<TweenerCore<Vector3, Vector3, VectorOptions>>();
58 public void OnRemove(
Queue q)
60 if (!q.button.interactable)
64 q.button.interactable =
false;
65 q.button.transform.DOScale(0f, 0.3f).OnComplete(delegate
67 if (q.button.gameObject)
69 UnityEngine.Object.DestroyImmediate(q.button.gameObject);
75 public void OnSetOwner()
79 this.mold = this.layout.CreateMold(
null);
81 this.layout.DestroyChildren(
false,
true);
87 if (this.queues.list.Count > 0 && !
this.queues.currentQueue.interaction.IsRunning)
89 this.OnRemove(this.queues.currentQueue);
97 public LayoutGroup layout;
100 public UIButton mold;