1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Mods/OsuModMagnetised.cs
2022-05-26 00:08:00 -04:00

37 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Configuration;
using osuTK;
namespace osu.Game.Rulesets.Osu.Mods
{
internal class OsuModMagnetised : OsuEaseHitObjectPositionsMod
{
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!";
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModRelax), typeof(OsuModRepel) }).ToArray();
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,
MinValue = 0.05f,
MaxValue = 1.0f,
};
public OsuModMagnetised()
{
EasementStrength.BindTo(AttractionStrength);
}
}
}