1
This commit is contained in:
@@ -101,26 +101,25 @@ public partial class WebSocketSendList
|
||||
WebSocketManager.Instance.Send(SocketType.game, JsonConvert.SerializeObject(sendObj));
|
||||
}
|
||||
/// <summary>
|
||||
/// 真人玩家发射子弹(新版,对接服务端 RoomFireNotice 新签名)
|
||||
/// 服务端方法:FireCannon(roomId, userId, gold, count, bulletIds, extra, isBot)
|
||||
/// 广播事件:RoomFireNotice(roomId, userId, gold, count, bulletIds, extra, isBot)
|
||||
/// 新版无需 timestamp 和 sign,bulletIds 由客户端生成
|
||||
/// 真人玩家发射子弹(对接后端最新签名)
|
||||
/// 服务端方法:Task<List<string>> FireCannon(roomId, userId, gold, count, timestamp, sign, extra)
|
||||
/// 返回值 List<string> 为服务端生成的 bulletIds,通过 RoomFireNotice 广播给房间所有人
|
||||
/// </summary>
|
||||
/// <param name="roomId">房间ID</param>
|
||||
/// <param name="userId">玩家ID</param>
|
||||
/// <param name="gold">单价</param>
|
||||
/// <param name="count">数量</param>
|
||||
/// <param name="bulletIds">子弹ID列表(客户端生成,长度需等于 count)</param>
|
||||
/// <param name="timestamp">秒级时间戳</param>
|
||||
/// <param name="sign">签名(MD5 前8位)</param>
|
||||
/// <param name="extra">附加数据(SyncGameData)</param>
|
||||
/// <param name="isBot">是否机器人(真人玩家固定 false)</param>
|
||||
public static void FireCannon(
|
||||
string roomId,
|
||||
string userId,
|
||||
long gold,
|
||||
int count,
|
||||
List<string> bulletIds,
|
||||
object extra,
|
||||
bool isBot = false
|
||||
long timestamp,
|
||||
string sign,
|
||||
object extra = null
|
||||
)
|
||||
{
|
||||
var sendObj = new WebSocketSendList(
|
||||
@@ -129,9 +128,9 @@ public partial class WebSocketSendList
|
||||
userId,
|
||||
gold,
|
||||
count,
|
||||
bulletIds,
|
||||
extra,
|
||||
isBot
|
||||
timestamp,
|
||||
sign,
|
||||
extra
|
||||
);
|
||||
|
||||
WebSocketManager.Instance.Send(SocketType.game, JsonConvert.SerializeObject(sendObj));
|
||||
|
||||
Reference in New Issue
Block a user