Beispiel #1
0
    public void Add(string s)
    {
        if (oldObject != null)
        {
            oldObject.OnDestroy();
        }
        GameObject           go       = NGUITools.AddChild(root.gameObject, effectInstance.gameObject);
        UIEffectInfoInstance uiEffect = go.GetComponent <UIEffectInfoInstance>();

        go.SetActive(true);
        uiEffect.AddText(s);
        oldObject = uiEffect;
    }
Beispiel #2
0
    public void Add(int effectID)
    {
        if (oldObject != null)
        {
            if (oldObject._effectID == effectID)
            {
                return;
            }
            oldObject.OnDestroy();
        }

        GameObject           go       = NGUITools.AddChild(root.gameObject, effectInstance.gameObject);
        UIEffectInfoInstance uiEffect = go.GetComponent <UIEffectInfoInstance>();

        go.SetActive(true);
        uiEffect.SetEffect(effectID);
        oldObject = uiEffect;
    }