mirror of
https://github.com/osukey/osukey.git
synced 2025-07-04 01:40:02 +09:00
Normalize all the line endings
This commit is contained in:
@ -1,35 +1,35 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public class CommandLoop : CommandTimelineGroup
|
||||
{
|
||||
public double LoopStartTime;
|
||||
public int LoopCount;
|
||||
|
||||
public override double StartTime => LoopStartTime + CommandsStartTime;
|
||||
public override double EndTime => StartTime + CommandsDuration * LoopCount;
|
||||
|
||||
public CommandLoop(double startTime, int loopCount)
|
||||
{
|
||||
LoopStartTime = startTime;
|
||||
LoopCount = loopCount;
|
||||
}
|
||||
|
||||
public override IEnumerable<CommandTimeline<T>.TypedCommand> GetCommands<T>(CommandTimelineSelector<T> timelineSelector, double offset = 0)
|
||||
{
|
||||
for (var loop = 0; loop < LoopCount; loop++)
|
||||
{
|
||||
var loopOffset = LoopStartTime + loop * CommandsDuration;
|
||||
foreach (var command in base.GetCommands(timelineSelector, offset + loopOffset))
|
||||
yield return command;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
=> $"{LoopStartTime} x{LoopCount}";
|
||||
}
|
||||
}
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
public class CommandLoop : CommandTimelineGroup
|
||||
{
|
||||
public double LoopStartTime;
|
||||
public int LoopCount;
|
||||
|
||||
public override double StartTime => LoopStartTime + CommandsStartTime;
|
||||
public override double EndTime => StartTime + CommandsDuration * LoopCount;
|
||||
|
||||
public CommandLoop(double startTime, int loopCount)
|
||||
{
|
||||
LoopStartTime = startTime;
|
||||
LoopCount = loopCount;
|
||||
}
|
||||
|
||||
public override IEnumerable<CommandTimeline<T>.TypedCommand> GetCommands<T>(CommandTimelineSelector<T> timelineSelector, double offset = 0)
|
||||
{
|
||||
for (var loop = 0; loop < LoopCount; loop++)
|
||||
{
|
||||
var loopOffset = LoopStartTime + loop * CommandsDuration;
|
||||
foreach (var command in base.GetCommands(timelineSelector, offset + loopOffset))
|
||||
yield return command;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
=> $"{LoopStartTime} x{LoopCount}";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user