mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 21:07:59 +09:00
Rename CatcherArea.MovableCatcher
to Catcher
This commit is contained in:
parent
da3499f10e
commit
94678064ff
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
{
|
{
|
||||||
area.OnNewResult(drawable, new CatchJudgementResult(fruit, new CatchJudgement())
|
area.OnNewResult(drawable, new CatchJudgementResult(fruit, new CatchJudgement())
|
||||||
{
|
{
|
||||||
Type = area.MovableCatcher.CanCatch(fruit) ? HitResult.Great : HitResult.Miss
|
Type = area.Catcher.CanCatch(fruit) ? HitResult.Great : HitResult.Miss
|
||||||
});
|
});
|
||||||
|
|
||||||
drawable.Expire();
|
drawable.Expire();
|
||||||
@ -125,13 +125,13 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
|
|
||||||
Add(droppedObjectContainer);
|
Add(droppedObjectContainer);
|
||||||
|
|
||||||
MovableCatcher = new Catcher(this, droppedObjectContainer, beatmapDifficulty)
|
Catcher = new Catcher(this, droppedObjectContainer, beatmapDifficulty)
|
||||||
{
|
{
|
||||||
X = CatchPlayfield.CENTER_X
|
X = CatchPlayfield.CENTER_X
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleHyperDash(bool status) => MovableCatcher.SetHyperDashState(status ? 2 : 1);
|
public void ToggleHyperDash(bool status) => Catcher.SetHyperDashState(status ? 2 : 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
MovableCatcher = Catcher,
|
Catcher = Catcher,
|
||||||
},
|
},
|
||||||
trailContainer,
|
trailContainer,
|
||||||
HitObjectContainer,
|
HitObjectContainer,
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
{
|
{
|
||||||
public const float CATCHER_SIZE = 106.75f;
|
public const float CATCHER_SIZE = 106.75f;
|
||||||
|
|
||||||
public Catcher MovableCatcher
|
public Catcher Catcher
|
||||||
{
|
{
|
||||||
get => catcher;
|
get => catcher;
|
||||||
set
|
set
|
||||||
@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
|
|
||||||
public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
public void OnNewResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
||||||
{
|
{
|
||||||
MovableCatcher.OnNewResult(hitObject, result);
|
Catcher.OnNewResult(hitObject, result);
|
||||||
|
|
||||||
if (!result.Type.IsScorable())
|
if (!result.Type.IsScorable())
|
||||||
return;
|
return;
|
||||||
@ -66,9 +66,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
if (hitObject.HitObject.LastInCombo)
|
if (hitObject.HitObject.LastInCombo)
|
||||||
{
|
{
|
||||||
if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result))
|
if (result.Judgement is CatchJudgement catchJudgement && catchJudgement.ShouldExplodeFor(result))
|
||||||
MovableCatcher.Explode();
|
Catcher.Explode();
|
||||||
else
|
else
|
||||||
MovableCatcher.Drop();
|
Catcher.Drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
comboDisplay.OnNewResult(hitObject, result);
|
comboDisplay.OnNewResult(hitObject, result);
|
||||||
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
public void OnRevertResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
public void OnRevertResult(DrawableCatchHitObject hitObject, JudgementResult result)
|
||||||
{
|
{
|
||||||
comboDisplay.OnRevertResult(hitObject, result);
|
comboDisplay.OnRevertResult(hitObject, result);
|
||||||
MovableCatcher.OnRevertResult(hitObject, result);
|
Catcher.OnRevertResult(hitObject, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
@ -88,27 +88,27 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
|
|
||||||
SetCatcherPosition(
|
SetCatcherPosition(
|
||||||
replayState?.CatcherX ??
|
replayState?.CatcherX ??
|
||||||
(float)(MovableCatcher.X + MovableCatcher.Speed * currentDirection * Clock.ElapsedFrameTime));
|
(float)(Catcher.X + Catcher.Speed * currentDirection * Clock.ElapsedFrameTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
{
|
{
|
||||||
base.UpdateAfterChildren();
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
comboDisplay.X = MovableCatcher.X;
|
comboDisplay.X = Catcher.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCatcherPosition(float X)
|
public void SetCatcherPosition(float X)
|
||||||
{
|
{
|
||||||
float lastPosition = MovableCatcher.X;
|
float lastPosition = Catcher.X;
|
||||||
float newPosition = Math.Clamp(X, 0, CatchPlayfield.WIDTH);
|
float newPosition = Math.Clamp(X, 0, CatchPlayfield.WIDTH);
|
||||||
|
|
||||||
MovableCatcher.X = newPosition;
|
Catcher.X = newPosition;
|
||||||
|
|
||||||
if (lastPosition < newPosition)
|
if (lastPosition < newPosition)
|
||||||
MovableCatcher.VisualDirection = Direction.Right;
|
Catcher.VisualDirection = Direction.Right;
|
||||||
else if (lastPosition > newPosition)
|
else if (lastPosition > newPosition)
|
||||||
MovableCatcher.VisualDirection = Direction.Left;
|
Catcher.VisualDirection = Direction.Left;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OnPressed(CatchAction action)
|
public bool OnPressed(CatchAction action)
|
||||||
@ -124,7 +124,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CatchAction.Dash:
|
case CatchAction.Dash:
|
||||||
MovableCatcher.Dashing = true;
|
Catcher.Dashing = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CatchAction.Dash:
|
case CatchAction.Dash:
|
||||||
MovableCatcher.Dashing = false;
|
Catcher.Dashing = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user