mirror of https://github.com/ppy/osu
Make judgements scale with cs
This commit is contained in:
parent
5e51a50658
commit
7a43677849
|
@ -19,12 +19,15 @@ public class OsuPlayfield : Playfield
|
|||
private readonly Container approachCircles;
|
||||
private readonly JudgementContainer<DrawableOsuJudgement> judgementLayer;
|
||||
private readonly ConnectionRenderer<OsuHitObject> connectionLayer;
|
||||
private readonly OsuRulesetContainer rulesetContainer;
|
||||
|
||||
public static readonly Vector2 BASE_SIZE = new Vector2(512, 384);
|
||||
|
||||
public OsuPlayfield()
|
||||
public OsuPlayfield(OsuRulesetContainer rulesetContainer)
|
||||
: base(BASE_SIZE.X)
|
||||
{
|
||||
this.rulesetContainer = rulesetContainer;
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
|
@ -69,10 +72,13 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
|||
if (!judgedObject.DisplayResult || !DisplayJudgements)
|
||||
return;
|
||||
|
||||
var explosionBaseSize = rulesetContainer.Beatmap.BeatmapInfo.BaseDifficulty.CircleSize;
|
||||
|
||||
DrawableOsuJudgement explosion = new DrawableOsuJudgement(result, judgedObject)
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition
|
||||
Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition,
|
||||
Scale = new Vector2((1.0f - 0.7f * (explosionBaseSize - 5) / 5) / 2 * 1.65f)
|
||||
};
|
||||
|
||||
judgementLayer.Add(explosion);
|
||||
|
|
|
@ -28,7 +28,7 @@ public OsuRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap)
|
|||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this);
|
||||
|
||||
protected override Playfield CreatePlayfield() => new OsuPlayfield();
|
||||
protected override Playfield CreatePlayfield() => new OsuPlayfield(this);
|
||||
|
||||
public override PassThroughInputManager CreateInputManager() => new OsuInputManager(Ruleset.RulesetInfo);
|
||||
|
||||
|
|
|
@ -65,13 +65,15 @@ protected override void LoadComplete()
|
|||
|
||||
this.FadeInFromZero(100, Easing.OutQuint);
|
||||
|
||||
var origScale = Scale;
|
||||
|
||||
switch (Result.Type)
|
||||
{
|
||||
case HitResult.None:
|
||||
break;
|
||||
case HitResult.Miss:
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
this.ScaleTo(origScale * 1.6f);
|
||||
this.ScaleTo(origScale, 100, Easing.In);
|
||||
|
||||
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
||||
this.RotateTo(40, 800, Easing.InQuint);
|
||||
|
@ -79,8 +81,8 @@ protected override void LoadComplete()
|
|||
this.Delay(600).FadeOut(200);
|
||||
break;
|
||||
default:
|
||||
this.ScaleTo(0.9f);
|
||||
this.ScaleTo(1, 500, Easing.OutElastic);
|
||||
this.ScaleTo(origScale * 0.9f);
|
||||
this.ScaleTo(origScale, 500, Easing.OutElastic);
|
||||
|
||||
this.Delay(100).FadeOut(400);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue