mirror of
https://github.com/ppy/osu
synced 2025-01-01 03:42:19 +00:00
Fix non-convert slider and spinner serialization
This commit is contained in:
parent
3e7f70e225
commit
a8b405791a
@ -7,6 +7,7 @@ using System.Collections.Generic;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Caching;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -21,6 +22,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
|
||||
|
||||
[JsonIgnore]
|
||||
public double Duration
|
||||
{
|
||||
get => EndTime - StartTime;
|
||||
@ -112,8 +114,11 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
/// </summary>
|
||||
public double TickDistanceMultiplier = 1;
|
||||
|
||||
public HitCircle HeadCircle;
|
||||
public SliderTailCircle TailCircle;
|
||||
[JsonIgnore]
|
||||
public HitCircle HeadCircle { get; protected set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public SliderTailCircle TailCircle { get; protected set; }
|
||||
|
||||
public Slider()
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
@ -29,6 +30,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
public List<IList<HitSampleInfo>> NodeSamples { get; set; }
|
||||
public int RepeatCount { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public double Duration
|
||||
{
|
||||
get => this.SpanCount() * Distance / Velocity;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osuTK;
|
||||
@ -13,12 +14,14 @@ namespace osu.Game.Rulesets.Objects
|
||||
/// <summary>
|
||||
/// The position of this <see cref="PathControlPoint"/>.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
public readonly Bindable<Vector2> Position = new Bindable<Vector2>();
|
||||
|
||||
/// <summary>
|
||||
/// The type of path segment starting at this <see cref="PathControlPoint"/>.
|
||||
/// If null, this <see cref="PathControlPoint"/> will be a part of the previous path segment.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
public readonly Bindable<PathType?> Type = new Bindable<PathType?>();
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,8 +1,6 @@
|
||||
// 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 Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Types
|
||||
{
|
||||
/// <summary>
|
||||
@ -28,7 +26,6 @@ namespace osu.Game.Rulesets.Objects.Types
|
||||
/// <summary>
|
||||
/// The duration of the HitObject.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
new double Duration { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user