예제 #1
0
    public void ShowMessage(string message, Color color)
    {
        PopupMessageVisual visual = null;

        while (mInactiveVisuals.Count > 0)
        {
            visual = mInactiveVisuals.Pop();
            if (visual != null)
            {
                break;
            }
        }

        if (visual == null)
        {
            visual = Instantiate(Prefab, transform);
        }

        visual.BeginAnimating(message, color);
    }
예제 #2
0
 public void AddInactiveVisual(PopupMessageVisual visual)
 {
     visual.gameObject.SetActive(false);
     mInactiveVisuals.Push(visual);
 }