public static SwingHolder GetSwing(SaberSwingRatingCounter ssrc) { SwingHolder sh = swings.Find((s) => s.ssrc == ssrc); swings.Remove(sh); return(sh); }
public static void AddPostswing(SaberSwingRatingCounter ssrc, float swing) { SwingHolder sh = swings.Find((s) => s.ssrc == ssrc); if (sh != null) { sh.AddPostSwing(swing); } }
public void HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter s) { ScoreModel.RawScoreWithoutMultiplier(s, n.info.cutDistanceToCenter, out int before, out int after, out int accuracy); SwingHolder sh = SwingTranspilerHandler.GetSwing(s as SaberSwingRatingCounter); if (sh != null) { n.preswing = sh.preswing; n.postswing = sh.postswing; } n.score = new int[] { before, accuracy, after }; n.timeDeviation = n.info.timeDeviation; n.speed = n.info.saberSpeed; n.cutPoint = Utils.FloatArrayFromVector(n.info.cutPoint); n.saberDir = Utils.FloatArrayFromVector(n.info.saberDir); n.info.swingRatingCounter.UnregisterDidFinishReceiver(this); }