mirror of
https://github.com/ppy/osu.git
synced 2024-12-20 00:13:04 +08:00
Merge branch 'ppy:master' into positional-sounds-strength-adjustment
This commit is contained in:
commit
d2e11ea622
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -26,12 +26,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public BindableFloat Scale { get; } = new BindableFloat(4)
|
public BindableFloat Scale { get; } = new BindableFloat(4)
|
||||||
{
|
{
|
||||||
Precision = 0.1f,
|
Precision = 0.1f,
|
||||||
MinValue = 2,
|
MinValue = 1.5f,
|
||||||
MaxValue = 10,
|
MaxValue = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Style", "Change the animation style of the approach circles.", 1)]
|
[SettingSource("Style", "Change the animation style of the approach circles.", 1)]
|
||||||
public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>();
|
public Bindable<AnimationStyle> Style { get; } = new Bindable<AnimationStyle>(AnimationStyle.Gravity);
|
||||||
|
|
||||||
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
|
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
|
||||||
{
|
{
|
||||||
@ -52,9 +52,18 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
switch (style)
|
switch (style)
|
||||||
{
|
{
|
||||||
default:
|
case AnimationStyle.Linear:
|
||||||
return Easing.None;
|
return Easing.None;
|
||||||
|
|
||||||
|
case AnimationStyle.Gravity:
|
||||||
|
return Easing.InBack;
|
||||||
|
|
||||||
|
case AnimationStyle.InOut1:
|
||||||
|
return Easing.InOutCubic;
|
||||||
|
|
||||||
|
case AnimationStyle.InOut2:
|
||||||
|
return Easing.InOutQuint;
|
||||||
|
|
||||||
case AnimationStyle.Accelerate1:
|
case AnimationStyle.Accelerate1:
|
||||||
return Easing.In;
|
return Easing.In;
|
||||||
|
|
||||||
@ -64,9 +73,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
case AnimationStyle.Accelerate3:
|
case AnimationStyle.Accelerate3:
|
||||||
return Easing.InQuint;
|
return Easing.InQuint;
|
||||||
|
|
||||||
case AnimationStyle.Gravity:
|
|
||||||
return Easing.InBack;
|
|
||||||
|
|
||||||
case AnimationStyle.Decelerate1:
|
case AnimationStyle.Decelerate1:
|
||||||
return Easing.Out;
|
return Easing.Out;
|
||||||
|
|
||||||
@ -76,16 +82,14 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
case AnimationStyle.Decelerate3:
|
case AnimationStyle.Decelerate3:
|
||||||
return Easing.OutQuint;
|
return Easing.OutQuint;
|
||||||
|
|
||||||
case AnimationStyle.InOut1:
|
default:
|
||||||
return Easing.InOutCubic;
|
throw new ArgumentOutOfRangeException(nameof(style), style, @"Unsupported animation style");
|
||||||
|
|
||||||
case AnimationStyle.InOut2:
|
|
||||||
return Easing.InOutQuint;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum AnimationStyle
|
public enum AnimationStyle
|
||||||
{
|
{
|
||||||
|
Linear,
|
||||||
Gravity,
|
Gravity,
|
||||||
InOut1,
|
InOut1,
|
||||||
InOut2,
|
InOut2,
|
||||||
|
@ -307,6 +307,9 @@ namespace osu.Game.Database
|
|||||||
case 10:
|
case 10:
|
||||||
string rulesetSettingClassName = getMappedOrOriginalName(typeof(RealmRulesetSetting));
|
string rulesetSettingClassName = getMappedOrOriginalName(typeof(RealmRulesetSetting));
|
||||||
|
|
||||||
|
if (!migration.OldRealm.Schema.TryFindObjectSchema(rulesetSettingClassName, out _))
|
||||||
|
return;
|
||||||
|
|
||||||
var oldSettings = migration.OldRealm.DynamicApi.All(rulesetSettingClassName);
|
var oldSettings = migration.OldRealm.DynamicApi.All(rulesetSettingClassName);
|
||||||
var newSettings = migration.NewRealm.All<RealmRulesetSetting>().ToList();
|
var newSettings = migration.NewRealm.All<RealmRulesetSetting>().ToList();
|
||||||
|
|
||||||
@ -329,6 +332,9 @@ namespace osu.Game.Database
|
|||||||
case 11:
|
case 11:
|
||||||
string keyBindingClassName = getMappedOrOriginalName(typeof(RealmKeyBinding));
|
string keyBindingClassName = getMappedOrOriginalName(typeof(RealmKeyBinding));
|
||||||
|
|
||||||
|
if (!migration.OldRealm.Schema.TryFindObjectSchema(keyBindingClassName, out _))
|
||||||
|
return;
|
||||||
|
|
||||||
var oldKeyBindings = migration.OldRealm.DynamicApi.All(keyBindingClassName);
|
var oldKeyBindings = migration.OldRealm.DynamicApi.All(keyBindingClassName);
|
||||||
var newKeyBindings = migration.NewRealm.All<RealmKeyBinding>().ToList();
|
var newKeyBindings = migration.NewRealm.All<RealmKeyBinding>().ToList();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user