Example #1
0
    public override void onUpdateSync <T>(WrapProperty wrapProperty, List <Sync <T> > syncs)
    {
        if (WrapProperty.checkError(wrapProperty))
        {
            return;
        }
        if (wrapProperty.p is UIData)
        {
            switch ((UIData.Property)wrapProperty.n)
            {
            case UIData.Property.state:
            {
                ValueChangeUtils.replaceCallBack(this, syncs);
                dirty = true;
            }
            break;

            default:
                Logger.LogError("Don't process: " + wrapProperty + "; " + this);
                break;
            }
            return;
        }
        // Child
        if (wrapProperty.p is State)
        {
            dirty = true;
            return;
        }
        Logger.LogError("Don't process: " + wrapProperty + "; " + syncs + "; " + this);
    }
Example #2
0
    public override void onUpdateSync <T>(WrapProperty wrapProperty, List <Sync <T> > syncs)
    {
        if (WrapProperty.checkError(wrapProperty))
        {
            return;
        }
        if (wrapProperty.p is UIData)
        {
            switch ((UIData.Property)wrapProperty.n)
            {
            case UIData.Property.toastData:
            {
                ValueChangeUtils.replaceCallBack(this, syncs);
                dirty = true;
            }
            break;

            case UIData.Property.toastMessageUI:
            {
                ValueChangeUtils.replaceCallBack(this, syncs);
                dirty = true;
            }
            break;

            default:
                Debug.LogError("unknown wrapProperty: " + wrapProperty + "; " + this);
                break;
            }
            return;
        }
        if (wrapProperty.p is ToastData)
        {
            switch ((ToastData.Property)wrapProperty.n)
            {
            case ToastData.Property.messages:
                dirty = true;
                break;

            case ToastData.Property.maxIndex:
                break;

            case ToastData.Property.state:
                dirty = true;
                break;

            default:
                Debug.LogError("unknown wrapProperty: " + wrapProperty + "; " + this);
                break;
            }
            return;
        }
        if (wrapProperty.p is ToastMessageUI.UIData)
        {
            return;
        }
        Debug.LogError("Don't process: " + wrapProperty + "; " + syncs + "; " + this);
    }