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;
|
2022-02-02 07:15:06 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2019-08-19 20:54:07 +00:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2022-02-02 07:15:06 +00:00
|
|
|
|
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
|
|
|
|
{
|
2022-04-01 03:15:26 +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;
|
2022-02-02 07:15:06 +00:00
|
|
|
|
|
2022-04-01 03:15:26 +00:00
|
|
|
|
[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)
|
2022-01-06 13:47:58 +00:00
|
|
|
|
{
|
|
|
|
|
Precision = 0.05f,
|
2022-02-02 07:26:10 +00:00
|
|
|
|
MinValue = 0.05f,
|
2022-01-06 13:47:58 +00:00
|
|
|
|
MaxValue = 1.0f,
|
|
|
|
|
};
|
2019-08-19 20:54:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|