示例#1
0
        private void SendScore(PPDGameUtility util, byte[] inputs, bool replaying, string perfectTrialToken)
        {
            if (util.IsRegular && Result != ResultEvaluateType.Mistake && WebManager.Instance.IsLogined && !replaying)
            {
                var hash = util.SongInformation.GetScoreHash(util.Difficulty);
                if (hash != null)
                {
                    ScoreSending?.Invoke();
                    ThreadManager.Instance.GetThread(() =>
                    {
                        var reason = WebManager.Instance.PlayResult(hash, Score, MarkEvals[0], MarkEvals[1], MarkEvals[2], MarkEvals[3], MarkEvals[4], MaxCombo,
                                                                    PPDGameUtility.SongInformation.StartTime, FinishTime, inputs, 3, perfectTrialToken, out Dictionary <string, string> data);

                        if (data.TryGetValue("PerfectTrialResult", out string result))
                        {
                            PerfectTrialSucceess |= result == "1";
                        }
                        ScoreSent?.Invoke(reason, data);
                    }).Start();
                }
            }
        }
示例#2
0
 protected virtual void OnScoreSent()
 {
     ScoreSent?.Invoke(this, EventArgs.Empty);
 }