private void addStaticCommands(List <IFragmentableCommand> segment, int startTime) { if (moveTimeline.HasCommands && !segment.Any(c => c is MoveCommand && c.StartTime == startTime)) { var value = moveTimeline.ValueAtTime(startTime); segment.Add(new MoveCommand(OsbEasing.None, startTime, startTime, value, value)); } if (moveXTimeline.HasCommands && !segment.Any(c => c is MoveXCommand && c.StartTime == startTime)) { var value = moveXTimeline.ValueAtTime(startTime); segment.Add(new MoveXCommand(OsbEasing.None, startTime, startTime, value, value)); } if (moveYTimeline.HasCommands && !segment.Any(c => c is MoveYCommand && c.StartTime == startTime)) { var value = moveYTimeline.ValueAtTime(startTime); segment.Add(new MoveYCommand(OsbEasing.None, startTime, startTime, value, value)); } if (rotateTimeline.HasCommands && !segment.Any(c => c is RotateCommand && c.StartTime == startTime)) { var value = rotateTimeline.ValueAtTime(startTime); segment.Add(new RotateCommand(OsbEasing.None, startTime, startTime, value, value)); } if (scaleTimeline.HasCommands && !segment.Any(c => c is ScaleCommand && c.StartTime == startTime)) { var value = scaleTimeline.ValueAtTime(startTime); segment.Add(new ScaleCommand(OsbEasing.None, startTime, startTime, value, value)); } if (scaleVecTimeline.HasCommands && !segment.Any(c => c is VScaleCommand && c.StartTime == startTime)) { var value = scaleVecTimeline.ValueAtTime(startTime); segment.Add(new VScaleCommand(OsbEasing.None, startTime, startTime, value, value)); } if (colorTimeline.HasCommands && !segment.Any(c => c is ColorCommand && c.StartTime == startTime)) { var value = colorTimeline.ValueAtTime(startTime); segment.Add(new ColorCommand(OsbEasing.None, startTime, startTime, value, value)); } if (fadeTimeline.HasCommands && !segment.Any(c => c is FadeCommand && c.StartTime == startTime)) { var value = fadeTimeline.ValueAtTime(startTime); segment.Add(new FadeCommand(OsbEasing.None, startTime, startTime, value, value)); } }
public CommandParameter FlipVAt(double time) => flipVTimeline.ValueAtTime(time);
public CommandParameter AdditiveAt(double time) => additiveTimeline.ValueAtTime(time);
public CommandColor ColorAt(double time) => colorTimeline.ValueAtTime(time);
public CommandDecimal OpacityAt(double time) => fadeTimeline.ValueAtTime(time);
public CommandDecimal RotationAt(double time) => rotateTimeline.ValueAtTime(time);
public CommandScale ScaleAt(double time) => scaleVecTimeline.HasCommands ? scaleVecTimeline.ValueAtTime(time) : new CommandScale(scaleTimeline.ValueAtTime(time));
public CommandPosition PositionAt(double time) => moveTimeline.HasCommands ? moveTimeline.ValueAtTime(time) : new CommandPosition(moveXTimeline.ValueAtTime(time), moveYTimeline.ValueAtTime(time));