Compare commits

..

No commits in common. "962462e0efce102c8ac1afe841849979049c0aab" and "8be77cf19ef9eefbbf52550aced6d99bbb52cfc1" have entirely different histories.

3 changed files with 6 additions and 68 deletions

View File

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

View File

@ -72,15 +72,6 @@ namespace Dof
public bool ShouldSerializePlayerLeave() => __pbn__actual.Is(6); public bool ShouldSerializePlayerLeave() => __pbn__actual.Is(6);
public void ResetPlayerLeave() => global::ProtoBuf.DiscriminatedUnionObject.Reset(ref __pbn__actual, 6); public void ResetPlayerLeave() => global::ProtoBuf.DiscriminatedUnionObject.Reset(ref __pbn__actual, 6);
[global::ProtoBuf.ProtoMember(21, Name = @"heartbeat")]
public Heartbeat Heartbeat
{
get => __pbn__actual.Is(21) ? ((Heartbeat)__pbn__actual.Object) : default;
set => __pbn__actual = new global::ProtoBuf.DiscriminatedUnionObject(21, value);
}
public bool ShouldSerializeHeartbeat() => __pbn__actual.Is(21);
public void ResetHeartbeat() => global::ProtoBuf.DiscriminatedUnionObject.Reset(ref __pbn__actual, 21);
} }
[global::ProtoBuf.ProtoContract()] [global::ProtoBuf.ProtoContract()]
@ -162,14 +153,6 @@ namespace Dof
[global::System.ComponentModel.DefaultValue("")] [global::System.ComponentModel.DefaultValue("")]
public string Country { get; set; } = ""; public string Country { get; set; } = "";
[global::ProtoBuf.ProtoMember(5, Name = @"app_id")]
[global::System.ComponentModel.DefaultValue("")]
public string AppId { get; set; } = "";
[global::ProtoBuf.ProtoMember(6, Name = @"token")]
[global::System.ComponentModel.DefaultValue("")]
public string Token { get; set; } = "";
} }
[global::ProtoBuf.ProtoContract()] [global::ProtoBuf.ProtoContract()]
@ -266,9 +249,6 @@ namespace Dof
[global::ProtoBuf.ProtoMember(3, Name = @"point_id")] [global::ProtoBuf.ProtoMember(3, Name = @"point_id")]
public int PointId { get; set; } public int PointId { get; set; }
[global::ProtoBuf.ProtoMember(4, Name = @"combo")]
public float Combo { get; set; }
} }
[global::ProtoBuf.ProtoContract()] [global::ProtoBuf.ProtoContract()]
@ -297,9 +277,6 @@ namespace Dof
[global::ProtoBuf.ProtoMember(1, Name = @"cid")] [global::ProtoBuf.ProtoMember(1, Name = @"cid")]
public long Cid { get; set; } public long Cid { get; set; }
[global::ProtoBuf.ProtoMember(2, Name = @"time_spent")]
public float TimeSpent { get; set; }
} }
[global::ProtoBuf.ProtoContract()] [global::ProtoBuf.ProtoContract()]
@ -342,18 +319,6 @@ namespace Dof
} }
[global::ProtoBuf.ProtoContract()]
public partial class Heartbeat : global::ProtoBuf.IExtensible
{
private global::ProtoBuf.IExtension __pbn__extensionData;
global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
=> global::ProtoBuf.Extensible.GetExtensionObject(ref __pbn__extensionData, createIfMissing);
[global::ProtoBuf.ProtoMember(1, Name = @"timestamp")]
public long Timestamp { get; set; }
}
} }
#pragma warning restore CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192 #pragma warning restore CS0612, CS0618, CS1591, CS3021, IDE0079, IDE1006, RCS1036, RCS1057, RCS1085, RCS1192

View File

@ -11,8 +11,6 @@ message ClientMessage {
LevelEnd level_end = 4; LevelEnd level_end = 4;
AllLevelEnd all_level_end = 5; AllLevelEnd all_level_end = 5;
PlayerLeave player_leave = 6; PlayerLeave player_leave = 6;
Heartbeat heartbeat = 21;
} }
} }
@ -33,8 +31,6 @@ message PlayerEnter {
string uid = 2; string uid = 2;
string nick_name = 3; string nick_name = 3;
string country = 4; string country = 4;
string app_id = 5;
string token = 6;
} }
message LevelResource { message LevelResource {
@ -66,7 +62,6 @@ message PointFound {
int64 cid = 1; int64 cid = 1;
string level = 2; string level = 2;
int32 point_id = 3; int32 point_id = 3;
float combo = 4;
} }
message LevelEnd { message LevelEnd {
@ -76,7 +71,6 @@ message LevelEnd {
message AllLevelEnd { message AllLevelEnd {
int64 cid = 1; int64 cid = 1;
float time_spent = 2;
} }
message GameScore { message GameScore {
@ -90,8 +84,4 @@ message GameFinish {
message PlayerLeave { message PlayerLeave {
int64 cid = 1; int64 cid = 1;
}
message Heartbeat {
int64 timestamp = 1;
} }