hch
7 天以前 ee3196b5a04c15d025d1a9eab825d5d14987758d
Main/System/Redpoint/RedpointCenter.cs
@@ -50,19 +50,46 @@
        }
    }
    //额外添加父红点用
    public void AddParent(int _parentId, int _childId)
    {
        Redpoint child = null;
        if (!redpoints.TryGetValue(_childId, out child))
        {
            Debug.LogErrorFormat("添加父子关系失败,子节点不存在:id->{0}", _childId);
            return;
        }
        child.otherParent = _parentId;
        List<int> children = null;
        if (!parentChildren.TryGetValue(_parentId, out children))
        {
            parentChildren[_parentId] = children = new List<int>();
        }
        if (!children.Contains(_childId))
        {
            children.Add(_childId);
        }
    }
    public void Report(Redpoint _redpoint)
    {
        var parentId = _redpoint.parent;
        if (redpointValueChangeEvent != null)
        {
            redpointValueChangeEvent(_redpoint.id);
        }
        if (parentId > 0)
        if (_redpoint.parent > 0)
        {
            TestParentValue(_redpoint.parent);
        }
        if (_redpoint.otherParent > 0)
        {
            TestParentValue(_redpoint.otherParent);
        }
    }
    public void ReportWithoutParent(Redpoint _redpoint)