コード例 #1
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        this.funcID = stream.readInt();

        this.matchTime = stream.readLong();

        BaseData locationT = stream.readDataFullNotNull();

        if (locationT != null)
        {
            if (locationT is SceneLocationData)
            {
                this.location = (SceneLocationData)locationT;
            }
            else
            {
                this.location = new SceneLocationData();
                if (!(locationT.GetType().IsAssignableFrom(typeof(SceneLocationData))))
                {
                    stream.throwTypeReadError(typeof(SceneLocationData), locationT.GetType());
                }
                this.location.shadowCopy(locationT);
            }
        }
        else
        {
            this.location = null;
        }

        stream.endReadObj();
    }
コード例 #2
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 改变
    /// </summary>
    public virtual void onChange(RoleShowChangeData data)
    {
        switch (data.type)
        {
        case RoleShowDataPartType.IsOnline:
        {
            this.isOnline = (data.arg0 == 1);
            //同时赋值两个
            this.lastOnlineTime = data.arg2;
        }
        break;

        case RoleShowDataPartType.LastOnlineTime:
        {
            this.lastOnlineTime = data.arg2;
        }
        break;

        case RoleShowDataPartType.Location:
        {
            this.location = ((SceneLocationRoleShowChangeData)data).localtion;
        }
        break;

        default:
        {
            //传递
            showData.onChange(data);
        }
        break;
        }
    }
コード例 #3
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is RoleSocialData))
        {
            return;
        }

        RoleSocialData mData = (RoleSocialData)data;

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

        this.isOnline = mData.isOnline;

        this.lastOnlineTime = mData.lastOnlineTime;

        if (mData.location != null)
        {
            this.location = (SceneLocationData)mData.location.clone();
        }
        else
        {
            this.location = null;
        }
    }
コード例 #4
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.showData       = null;
     this.isOnline       = false;
     this.lastOnlineTime = 0L;
     this.location       = null;
 }
コード例 #5
0
ファイル: SceneLocationData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        SceneLocationData mData = (SceneLocationData)data;

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

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

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

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

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

        return(true);
    }
コード例 #6
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.funcID = stream.readInt();

        this.matchTime = stream.readLong();

        this.location = (SceneLocationData)stream.readDataSimpleNotNull();
    }
コード例 #7
0
ファイル: SceneEnterArgData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.location = (SceneLocationData)stream.readDataSimpleNotNull();

        this.posID = stream.readInt();

        this.useCache = stream.readBoolean();
    }
コード例 #8
0
ファイル: SceneEnterArgData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is SceneEnterArgData))
        {
            return;
        }

        SceneEnterArgData mData = (SceneEnterArgData)data;

        this.location = mData.location;
        this.posID    = mData.posID;
        this.useCache = mData.useCache;
    }
コード例 #9
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        if (stream.readBoolean())
        {
            this.localtion = (SceneLocationData)stream.readDataSimpleNotNull();
        }
        else
        {
            this.localtion = null;
        }
    }
コード例 #10
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        base.toShadowCopy(data);

        if (!(data is SceneLocationRoleShowChangeData))
        {
            return;
        }

        SceneLocationRoleShowChangeData mData = (SceneLocationRoleShowChangeData)data;

        this.localtion = mData.localtion;
    }
コード例 #11
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;
    }
コード例 #12
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is RoleSocialData))
        {
            return;
        }

        RoleSocialData mData = (RoleSocialData)data;

        this.showData       = mData.showData;
        this.isOnline       = mData.isOnline;
        this.lastOnlineTime = mData.lastOnlineTime;
        this.location       = mData.location;
    }
コード例 #13
0
ファイル: SceneLocationData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is SceneLocationData))
        {
            return;
        }

        SceneLocationData mData = (SceneLocationData)data;

        this.sceneID       = mData.sceneID;
        this.lineID        = mData.lineID;
        this.serverID      = mData.serverID;
        this.executorIndex = mData.executorIndex;
        this.instanceID    = mData.instanceID;
    }
コード例 #14
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.showData = (RoleShowData)stream.readDataSimpleNotNull();

        this.isOnline = stream.readBoolean();

        this.lastOnlineTime = stream.readLong();

        if (stream.readBoolean())
        {
            this.location = (SceneLocationData)stream.readDataSimpleNotNull();
        }
        else
        {
            this.location = null;
        }
    }
コード例 #15
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        base.toCopy(data);

        if (!(data is SceneLocationRoleShowChangeData))
        {
            return;
        }

        SceneLocationRoleShowChangeData mData = (SceneLocationRoleShowChangeData)data;

        if (mData.localtion != null)
        {
            this.localtion = (SceneLocationData)mData.localtion.clone();
        }
        else
        {
            this.localtion = null;
        }
    }
コード例 #16
0
ファイル: SceneEnterArgData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is SceneEnterArgData))
        {
            return;
        }

        SceneEnterArgData mData = (SceneEnterArgData)data;

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

        this.posID = mData.posID;

        this.useCache = mData.useCache;
    }
コード例 #17
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");
        }
    }
コード例 #18
0
    /// <summary>
    /// 回池
    /// </summary>
    protected override void toRelease(DataPool pool)
    {
        base.toRelease(pool);

        this.localtion = null;
    }
コード例 #19
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        BaseData showDataT = stream.readDataFullNotNull();

        if (showDataT != null)
        {
            if (showDataT is RoleShowData)
            {
                this.showData = (RoleShowData)showDataT;
            }
            else
            {
                this.showData = new RoleShowData();
                if (!(showDataT.GetType().IsAssignableFrom(typeof(RoleShowData))))
                {
                    stream.throwTypeReadError(typeof(RoleShowData), showDataT.GetType());
                }
                this.showData.shadowCopy(showDataT);
            }
        }
        else
        {
            this.showData = null;
        }

        this.isOnline = stream.readBoolean();

        this.lastOnlineTime = stream.readLong();

        if (stream.readBoolean())
        {
            BaseData locationT = stream.readDataFullNotNull();
            if (locationT != null)
            {
                if (locationT is SceneLocationData)
                {
                    this.location = (SceneLocationData)locationT;
                }
                else
                {
                    this.location = new SceneLocationData();
                    if (!(locationT.GetType().IsAssignableFrom(typeof(SceneLocationData))))
                    {
                        stream.throwTypeReadError(typeof(SceneLocationData), locationT.GetType());
                    }
                    this.location.shadowCopy(locationT);
                }
            }
            else
            {
                this.location = null;
            }
        }
        else
        {
            this.location = null;
        }

        stream.endReadObj();
    }
コード例 #20
0
ファイル: SceneEnterArgData.cs プロジェクト: shineTeam7/home3
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.location = null;
     this.posID    = 0;
     this.useCache = false;
 }
コード例 #21
0
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.funcID    = 0;
     this.matchTime = 0L;
     this.location  = null;
 }
コード例 #22
0
 /// <summary>
 /// 初始化初值
 /// </summary>
 public override void initDefault()
 {
     this.location = new SceneLocationData();
     this.location.initDefault();
 }