public override void SubmitGameData(U8ExtraGameData data) { NSObject extraData = Class.newInstance("U8UserExtraData"); extraData.setValueForKey("dataType", data.dataType); extraData.setValueForKey("roleID", data.roleID); extraData.setValueForKey("roleName", data.roleName); extraData.setValueForKey("roleLevel", data.roleLevel); extraData.setValueForKey("serverID", data.serverID); extraData.setValueForKey("serverName", data.serverName); extraData.setValueForKey("moneyNum", data.moneyNum); u8SDK.Call("submitGameData", extraData); }
private string encodeGameData(U8ExtraGameData data) { Dictionary <string, object> map = new Dictionary <string, object>(); map.Add("dataType", data.dataType); map.Add("roleID", data.roleID); map.Add("roleName", data.roleName); map.Add("roleLevel", data.roleLevel); map.Add("serverID", data.serverID); map.Add("serverName", data.serverName); map.Add("moneyNum", data.moneyNum); map.Add("roleCreateTime", data.roleCreateTime); map.Add("roleLevelUpTime", data.roleLevelUpTime); return(MiniJSON.Json.Serialize(map)); }
public override void SubmitGameData(U8ExtraGameData data) { string json = encodeGameData(data); SDKCall("submitExtraData", json); }
public override void SubmitGameData(U8ExtraGameData data) { throw new NotImplementedException(); }
//上传游戏数据 public abstract void SubmitGameData(U8ExtraGameData data);