void OnMatchEnd(MatchEndEvent evt) { new CustomEventBuilder("matchCompleted") .AddParameter("players", evt.MatchConfig.PlayerConfigs?.Length) .AddParameter("stage", evt.MatchConfig.StageID) .AddParameter("stocks", evt.MatchConfig.Stocks) .AddParameter("time", evt.MatchConfig.Time) .AddParameter("result", evt.MatchResult) .AddParameter("result", evt.MatchResult) .Execute(); }
/// <summary> /// Called when the match ends. /// </summary> /// <returns></returns> private bool MatchEnd() { if (!AtEnd) { AtEnd = true; MatchEndEvent ev = new MatchEndEvent(); AppendEvent(ev); if (OnMatchEnd != null) { OnMatchEnd(this, ev); } return(true); } return(false); }
public static void InvokeMatchEndEvent(MatchEndEventArgs args) { MatchEndEvent?.Invoke(args); }
private void GenMatchEndEvent() { MatchEndEvent e = new MatchEndEvent(); eventLog.AddEvent(e.type, JsonConvert.SerializeObject(e, Formatting.Indented, GeneralUtils.jss)); }