public BatchEvent(int count, float start, string name, BaseEventParam param) { this.count = count; this.start = start; this.name = name; this.@params = param ?? new BaseEventParam(); }
public static void Validate(string openId, string playerId, int timeout, Action callback) { _validSeq++; var validSeqTmp = _validSeq; Init(openId, playerId, timeout); var eve = new BaseEvent(Events.InitSdk); var param = new BaseEventParam { Sv = SdKonfig.Version, Pi = playerId, Gi = GameInfo.GameId, Sc = 9 }; eve.@params = param; var list = new List <BaseEvent> { eve }; PushEvent <BaseEventParam> (list, true, () => { if (validSeqTmp == _validSeq) { callback?.Invoke(); } }); StartEventUpload(); }
private static void AddEventToQueue(BaseEventParam param, string eventName) { param.Sv = SdKonfig.Version; param.Pi = Player.Id; param.Gi = GameInfo.GameId; param.Sc = 9; _queue.Add(new BaseEvent(param, eventName)); }
public void OnEvent(string eventName, BaseEventParam param, Action <bool> callback) { var start = Util.GetTime(); var events = new List <BatchEvent> (); if (param == null) { param = new BaseEventParam(); } events.Add(new BatchEvent(1, start, eventName, param)); Util.Request(4, start, 0, events, callback); }
public BaseEvent(BaseEventParam param, string eventName) { this.@params = param; this.eventName = eventName; }
public BaseEvent(string eventName) { this.@params = new BaseEventParam(); this.eventName = eventName; }