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.

32 lines
1.2 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)]
2022-06-09 22:26:18 +00:00
public override BindableFloat EasingStrength { get; } = new BindableFloat(0.5f)
{
Precision = 0.05f,
2022-02-02 07:26:10 +00:00
MinValue = 0.05f,
MaxValue = 1.0f,
};
2019-08-19 20:54:07 +00:00
}
}