2021-04-14 07:52:29 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2021-04-20 09:36:11 +00:00
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2021-04-15 04:06:52 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2021-04-20 09:36:11 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
2021-04-14 07:52:29 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Mods
|
|
|
|
{
|
2021-06-16 09:52:01 +00:00
|
|
|
public class OsuModBarrelRoll : ModBarrelRoll<OsuHitObject>, IApplicableToDrawableHitObject
|
2021-04-14 07:52:29 +00:00
|
|
|
{
|
2021-06-16 09:52:01 +00:00
|
|
|
public void ApplyToDrawableHitObject(DrawableHitObject d)
|
2021-04-20 09:36:11 +00:00
|
|
|
{
|
2021-06-16 09:52:01 +00:00
|
|
|
d.OnUpdate += _ =>
|
2021-04-20 09:36:11 +00:00
|
|
|
{
|
2021-06-16 09:52:01 +00:00
|
|
|
switch (d)
|
2021-04-20 09:36:11 +00:00
|
|
|
{
|
2021-06-16 09:52:01 +00:00
|
|
|
case DrawableHitCircle circle:
|
|
|
|
circle.CirclePiece.Rotation = -CurrentRotation;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
};
|
2021-04-20 09:36:11 +00:00
|
|
|
}
|
2021-04-14 07:52:29 +00:00
|
|
|
}
|
|
|
|
}
|