osu/osu.Game.Rulesets.Osu/Mods/OsuModMagnetised.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.3 KiB
C#
Raw Normal View History

2019-08-19 20:54:07 +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 System;
2022-05-26 04:08:00 +00:00
using System.Linq;
using osu.Framework.Bindables;
2019-08-19 20:54:07 +00:00
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
2019-08-21 19:37:56 +00:00
using osuTK;
2019-08-19 20:54:07 +00:00
namespace osu.Game.Rulesets.Osu.Mods
{
2022-05-26 04:08:00 +00:00
internal class OsuModMagnetised : OsuEaseHitObjectPositionsMod
2019-08-19 20:54:07 +00:00
{
public override string Name => "Magnetised";
public override string Acronym => "MG";
public override IconUsage? Icon => FontAwesome.Solid.Magnet;
public override string Description => "No need to chase the circles your cursor is a magnet!";
2022-05-26 04:08:00 +00:00
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModRelax), typeof(OsuModRepel) }).ToArray();
2019-08-19 20:54:07 +00:00
2022-05-26 04:08:00 +00:00
protected override Vector2 DestinationVector => CursorPosition;
[SettingSource("Attraction strength", "How strong the pull is.", 0)]
public BindableFloat AttractionStrength { get; } = new BindableFloat(0.5f)
{
Precision = 0.05f,
2022-02-02 07:26:10 +00:00
MinValue = 0.05f,
MaxValue = 1.0f,
};
2022-01-05 12:05:22 +00:00
2022-05-26 04:08:00 +00:00
public OsuModMagnetised()
2022-01-05 12:05:22 +00:00
{
2022-05-26 04:08:00 +00:00
EasementStrength.BindTo(AttractionStrength);
2019-08-19 20:54:07 +00:00
}
}
}