Пример #1
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        MatchSceneData mData = (MatchSceneData)data;

        if (this.funcID != mData.funcID)
        {
            return(false);
        }

        if (this.matchTime != mData.matchTime)
        {
            return(false);
        }

        if (mData.location != null)
        {
            if (this.location == null)
            {
                return(false);
            }
            if (!this.location.dataEquals(mData.location))
            {
                return(false);
            }
        }
        else
        {
            if (this.location != null)
            {
                return(false);
            }
        }

        return(true);
    }
Пример #2
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is MatchSceneData))
        {
            return;
        }

        MatchSceneData mData = (MatchSceneData)data;

        this.funcID    = mData.funcID;
        this.matchTime = mData.matchTime;
        this.location  = mData.location;
    }
Пример #3
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is MatchSceneData))
        {
            return;
        }

        MatchSceneData mData = (MatchSceneData)data;

        this.funcID = mData.funcID;

        this.matchTime = mData.matchTime;

        if (mData.location != null)
        {
            this.location = (SceneLocationData)mData.location.clone();
        }
        else
        {
            this.location = null;
            nullObjError("location");
        }
    }