mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Make CI happy.
This commit is contained in:
parent
6cde687d87
commit
e63fb5720c
@ -21,8 +21,7 @@ namespace osu.Desktop.Tests.Visual
|
||||
|
||||
private readonly Bindable<WorkingBeatmap> beatmapBacking = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private MusicController musicController;
|
||||
private Container<Storyboard> storyboardContainer;
|
||||
private readonly Container<Storyboard> storyboardContainer;
|
||||
private Storyboard storyboard;
|
||||
|
||||
public TestCaseStoryboard()
|
||||
@ -45,7 +44,7 @@ namespace osu.Desktop.Tests.Visual
|
||||
},
|
||||
},
|
||||
});
|
||||
Add(musicController = new MusicController
|
||||
Add(new MusicController
|
||||
{
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Storyboards
|
||||
public override void ApplyTransforms(Drawable drawable, double offset = 0)
|
||||
=> base.ApplyTransforms(drawable, offset + LoopStartTime);
|
||||
|
||||
protected override void PostProcess(Command command, TransformSequence<Drawable> sequence)
|
||||
protected override void PostProcess(ICommand command, TransformSequence<Drawable> sequence)
|
||||
=> sequence.Loop(Duration - command.Duration, LoopCount);
|
||||
|
||||
public override string ToString()
|
||||
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public class CommandTimeline<T> : CommandTimeline
|
||||
public class CommandTimeline<T> : ICommandTimeline
|
||||
{
|
||||
private readonly List<TypedCommand> commands = new List<TypedCommand>();
|
||||
public IEnumerable<TypedCommand> Commands => commands.OrderBy(c => c.StartTime);
|
||||
@ -37,7 +37,7 @@ namespace osu.Game.Storyboards
|
||||
public override string ToString()
|
||||
=> $"{commands.Count} command(s)";
|
||||
|
||||
public class TypedCommand : Command
|
||||
public class TypedCommand : ICommand
|
||||
{
|
||||
public Easing Easing { get; set; }
|
||||
public double StartTime { get; set; }
|
||||
@ -52,14 +52,14 @@ namespace osu.Game.Storyboards
|
||||
}
|
||||
}
|
||||
|
||||
public interface CommandTimeline
|
||||
public interface ICommandTimeline
|
||||
{
|
||||
double StartTime { get; }
|
||||
double EndTime { get; }
|
||||
bool HasCommands { get; }
|
||||
}
|
||||
|
||||
public interface Command
|
||||
public interface ICommand
|
||||
{
|
||||
Easing Easing { get; set; }
|
||||
double StartTime { get; set; }
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Storyboards
|
||||
public CommandTimeline<bool> FlipH = new CommandTimeline<bool>();
|
||||
public CommandTimeline<bool> FlipV = new CommandTimeline<bool>();
|
||||
|
||||
public IEnumerable<CommandTimeline> Timelines
|
||||
public IEnumerable<ICommandTimeline> Timelines
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -99,7 +99,7 @@ namespace osu.Game.Storyboards
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void PostProcess(Command command, TransformSequence<Drawable> sequence)
|
||||
protected virtual void PostProcess(ICommand command, TransformSequence<Drawable> sequence)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -5,20 +5,20 @@ namespace osu.Game.Storyboards
|
||||
{
|
||||
public class CommandTrigger : CommandTimelineGroup
|
||||
{
|
||||
private string triggerName;
|
||||
private double startTime;
|
||||
private double endTime;
|
||||
private int groupNumber;
|
||||
public string TriggerName;
|
||||
public double TriggerStartTime;
|
||||
public double TriggerEndTime;
|
||||
public int GroupNumber;
|
||||
|
||||
public CommandTrigger(string triggerName, double startTime, double endTime, int groupNumber)
|
||||
{
|
||||
this.triggerName = triggerName;
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
this.groupNumber = groupNumber;
|
||||
TriggerName = triggerName;
|
||||
TriggerStartTime = startTime;
|
||||
TriggerEndTime = endTime;
|
||||
GroupNumber = groupNumber;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
=> $"{triggerName} {startTime} -> {endTime} ({groupNumber})";
|
||||
=> $"{TriggerName} {TriggerStartTime} -> {TriggerEndTime} ({GroupNumber})";
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Animations;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.File;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Storyboards.Drawables
|
||||
|
@ -5,7 +5,6 @@ using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.File;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Storyboards.Drawables
|
||||
|
@ -5,7 +5,7 @@ using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public interface ElementDefinition
|
||||
public interface IElementDefinition
|
||||
{
|
||||
string Path { get; }
|
||||
Drawable CreateDrawable();
|
@ -13,8 +13,8 @@ namespace osu.Game.Storyboards
|
||||
public bool EnabledWhenPassing = true;
|
||||
public bool EnabledWhenFailing = true;
|
||||
|
||||
private List<ElementDefinition> elements = new List<ElementDefinition>();
|
||||
public IEnumerable<ElementDefinition> Elements => elements;
|
||||
private readonly List<IElementDefinition> elements = new List<IElementDefinition>();
|
||||
public IEnumerable<IElementDefinition> Elements => elements;
|
||||
|
||||
public LayerDefinition(string name, int depth)
|
||||
{
|
||||
@ -22,7 +22,7 @@ namespace osu.Game.Storyboards
|
||||
Depth = depth;
|
||||
}
|
||||
|
||||
public void Add(ElementDefinition element)
|
||||
public void Add(IElementDefinition element)
|
||||
{
|
||||
elements.Add(element);
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public class SampleDefinition : ElementDefinition
|
||||
public class SampleDefinition : IElementDefinition
|
||||
{
|
||||
public string Path { get; private set; }
|
||||
public string Path { get; set; }
|
||||
public double Time;
|
||||
public float Volume;
|
||||
|
||||
|
@ -9,14 +9,14 @@ using System.Linq;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public class SpriteDefinition : CommandTimelineGroup, ElementDefinition
|
||||
public class SpriteDefinition : CommandTimelineGroup, IElementDefinition
|
||||
{
|
||||
public string Path { get; private set; }
|
||||
public string Path { get; set; }
|
||||
public Anchor Origin;
|
||||
public Vector2 InitialPosition;
|
||||
|
||||
private List<CommandLoop> loops = new List<CommandLoop>();
|
||||
private List<CommandTrigger> triggers = new List<CommandTrigger>();
|
||||
private readonly List<CommandLoop> loops = new List<CommandLoop>();
|
||||
private readonly List<CommandTrigger> triggers = new List<CommandTrigger>();
|
||||
|
||||
public SpriteDefinition(string path, Anchor origin, Vector2 initialPosition)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@
|
||||
<Compile Include="Storyboards\Drawables\StoryboardAnimation.cs" />
|
||||
<Compile Include="Storyboards\Drawables\StoryboardSprite.cs" />
|
||||
<Compile Include="Storyboards\AnimationDefinition.cs" />
|
||||
<Compile Include="Storyboards\ElementDefinition.cs" />
|
||||
<Compile Include="Storyboards\IElementDefinition.cs" />
|
||||
<Compile Include="Storyboards\CommandTimeline.cs" />
|
||||
<Compile Include="Storyboards\CommandTimelineGroup.cs" />
|
||||
<Compile Include="Storyboards\CommandTrigger.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user