发送信息数据更新

main
xiaohang 2023-09-15 18:23:02 +08:00
parent 71e9d0da21
commit 962462e0ef
1 changed files with 23 additions and 6 deletions

View File

@ -34,7 +34,7 @@ namespace DofLibrary
set => _cid = value;
}
public void PlayerEnter(string roomId, string uid, string nickName, string country)
public void PlayerEnter(string roomId, string uid, string nickName, string country, string appId, string token)
{
var playerEnter = new ClientMessage
{
@ -43,7 +43,9 @@ namespace DofLibrary
RoomId = roomId,
Uid = uid,
NickName = nickName,
Country = country
Country = country,
AppId = appId,
Token = token
}
};
Send(playerEnter);
@ -64,7 +66,7 @@ namespace DofLibrary
Debug.Log("LevelPrepared message sent");
}
public void PointFound(string levelId, int pointId)
public void PointFound(string levelId, int pointId, float combo)
{
var message = new ClientMessage
{
@ -72,7 +74,8 @@ namespace DofLibrary
{
Cid = _cid,
Level = levelId,
PointId = pointId
PointId = pointId,
Combo = combo
}
};
Send(message);
@ -93,18 +96,32 @@ namespace DofLibrary
Debug.Log("LevelEnd message sent");
}
public void AllLevelEnd()
public void AllLevelEnd(float timeSpent)
{
var message = new ClientMessage
{
AllLevelEnd = new AllLevelEnd
{
Cid = _cid
Cid = _cid,
TimeSpent = timeSpent
}
};
Send(message);
Debug.Log("AllLevelEnd message sent");
}
public void Heartbeat(long timestamp)
{
var message = new ClientMessage
{
Heartbeat = new Heartbeat
{
Timestamp = timestamp
}
};
Send(message);
Debug.Log("Heartbeat message sent");
}
private void Send(ClientMessage message)
{