コード例 #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);
 }