public void addToStreamEx(Bundle stream, PLAYER_ACTION_DIC v) { stream.writeInt8(v.pai); stream.writeUint8(v.hu); stream.writeUint8(v.peng); stream.writeUint8(v.gang); gangpai_DataType.addToStreamEx(stream, v.gangpai); }
public void addToStreamEx(Bundle stream, ROOM_INFOS v) { stream.writeUint64(v.roomKey); stream.writeUnicode(v.name); stream.writeUnicode(v.intro); stream.writeUint8(v.playerCount); stream.writeUint8(v.isPlaying); stream.writeUint8(v.hasPassword); }
public void addToStreamEx(Bundle stream, AVATAR_INFOS v) { stream.writeUint64(v.dbid); stream.writeUnicode(v.Name); stream.writeUint8(v.RoleType); stream.writeUint8(v.Country); stream.writeUint8(v.Sex); stream.writeInt16(v.Level); stream.writeInt32(v.Gold); }
public void addToStreamEx(Bundle stream, MATCHING_INFOS v) { stream.writeInt32(v.id); stream.writeUnicode(v.name); stream.writeUint8(v.roleType); stream.writeInt32(v.weaponId); stream.writeUint8(v.roomId); stream.writeUint8(v.roomPosition); stream.writeUint8(v.teamId); }
public void addToStreamEx(Bundle stream, ROOM_PUBLIC_INFO v) { stream.writeUint8(v.RoomType); stream.writeUint8(v.playerMaxCount); stream.writeUnicode(v.state); stream.writeInt8(v.turn); stream.writeUint8(v.numOfMJ); stream.writeInt8(v.button); playerInfo_DataType.addToStreamEx(stream, v.playerInfo); stream.writeInt8(v.chuPai); }
public void addToStreamEx(Bundle stream, MAIL v) { stream.writeUint64(v.senderDBID); stream.writeUnicode(v.senderName); stream.writeUint64(v.targetDBID); stream.writeUnicode(v.targetName); stream.writeUint8(v.lookOver); stream.writeUint8(v.mailType); stream.writeUnicode(v.mailInfo); stream.writeInt32(v.mailID); }
public void addToStreamEx(Bundle stream, ROOM_INFO v) { stream.writeUint64(v.room_key); stream.writeUint8(v.player_count); stream.writeInt8(v.room_state); stream.writeInt32(v.room_creater); }
public void addToStreamEx(Bundle stream, SPACE_INFO v) { stream.writeUint64(v.space_key); stream.writeUint8(v.player_count); stream.writeInt8(v.space_state); stream.writeInt32(v.space_creater); }
public void addToStreamEx(Bundle stream, ENTITYDATA v) { stream.writeUnicode(v.playerName); stream.writeInt32(v.playerBean); stream.writeUint8(v.roomIndex); stream.writeUint64(v.playerID); }
public void addToStreamEx(Bundle stream, PLAYRE_DATA v) { stream.writeUnicode(v.playerName); stream.writeUint64(v.playerDBID); stream.writeUint32(v.playerGold); stream.writeUint8(v.isOnLine); }
public void addToStreamEx(Bundle stream, AVATAR_INFO v) { stream.writeUint64(v.dbid); stream.writeUnicode(v.name); stream.writeUint8(v.roleType); stream.writeUint16(v.level); }
public void addToStreamEx(Bundle stream, AVATAR_INFOS v) { stream.writeUint64(v.dbid); stream.writeUnicode(v.name); stream.writeUint8(v.roleType); stream.writeInt32(v.weaponId); }
public void addToStreamEx(Bundle stream, FRIENDDATA v) { stream.writeUint8(v.status); stream.writeUint64(v.playerID); stream.writeUnicode(v.playerName); stream.writeInt32(v.playerBean); stream.writeEntitycall(v.playerEntity); }
public override void addToStream(Bundle stream, object v) { stream.writeUint8(Convert.ToByte(v)); }
/* 更新当前玩家的位置与朝向到服务端, 可以通过开关_syncPlayer关闭这个机制 */ public void updatePlayerToServer() { if(!_args.syncPlayer || spaceID == 0) { return; } TimeSpan span = DateTime.Now - _lastUpdateToServerTime; if(span.Milliseconds < 50) return; Entity playerEntity = player(); if(playerEntity == null || playerEntity.inWorld == false) return; _lastUpdateToServerTime = System.DateTime.Now; Vector3 position = playerEntity.position; Vector3 direction = playerEntity.direction; bool posHasChanged = Vector3.Distance(_entityLastLocalPos, position) > 0.001f; bool dirHasChanged = Vector3.Distance(_entityLastLocalDir, direction) > 0.001f; if(posHasChanged || dirHasChanged) { _entityLastLocalPos = position; _entityLastLocalDir = direction; Bundle bundle = new Bundle(); bundle.newMessage(Message.messages["Baseapp_onUpdateDataFromClient"]); bundle.writeFloat(position.x); bundle.writeFloat(position.y); bundle.writeFloat(position.z); bundle.writeFloat((float)((double)direction.x / 360 * 6.283185307179586)); bundle.writeFloat((float)((double)direction.y / 360 * 6.283185307179586)); bundle.writeFloat((float)((double)direction.z / 360 * 6.283185307179586)); bundle.writeUint8((Byte)(playerEntity.isOnGround == true ? 1 : 0)); bundle.writeUint32(spaceID); bundle.send(_networkInterface); } }
public void updatePlayerToServer() { Entity playerEntity = player(); if(playerEntity == null || playerEntity.inWorld == false) return; Vector3 position = playerEntity.position; Vector3 direction = playerEntity.direction; Bundle bundle = new Bundle(); bundle.newMessage(Message.messages["Baseapp_onUpdateDataFromClient"]); bundle.writeFloat(position.x); bundle.writeFloat(position.y); bundle.writeFloat(position.z); bundle.writeFloat(direction.z); bundle.writeFloat(direction.y); bundle.writeFloat(direction.x); bundle.writeUint8((Byte)(playerEntity.isOnGound == true ? 1 : 0)); bundle.send(networkInterface_); }
public void addToStreamEx(Bundle stream, AVATAR_INFO v) { stream.writeInt32(v.entity_id); stream.writeVector3(v.born_position); stream.writeUint8(v.born_yaw); }
public void addToStreamEx(Bundle stream, FS_ENTITY_DATA v) { stream.writeInt32(v.entityid); stream.writeUint8(v.cmd_type); stream.writeBlob(v.datas); }
public void addToStreamEx(Bundle stream, CARDGROUP_INFO v) { stream.writeUnicode(v.Name); stream.writeUint8(v.RoleType); CardList_DataType.addToStreamEx(stream, v.CardList); }
public void addToStreamEx(Bundle stream, CARD_INFO v) { stream.writeUint64(v.CardID); stream.writeUint8(v.CardNum); }