mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Update loop logic in line with framework changes
This commit is contained in:
@ -21,10 +21,10 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
private const int start_time = 0;
|
||||
private const int duration = 1000;
|
||||
|
||||
private Container container;
|
||||
|
||||
public TestCaseContextMenu()
|
||||
{
|
||||
MyContextMenuContainer container;
|
||||
|
||||
Add(container = new MyContextMenuContainer
|
||||
{
|
||||
Size = new Vector2(200),
|
||||
@ -54,43 +54,26 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
container.Transforms.Add(new TransformPosition
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
using (container.BeginLoopedSequece())
|
||||
{
|
||||
StartValue = Vector2.Zero,
|
||||
EndValue = new Vector2(0, 100),
|
||||
StartTime = start_time,
|
||||
EndTime = start_time + duration,
|
||||
LoopCount = -1,
|
||||
LoopDelay = duration * 3
|
||||
});
|
||||
container.Transforms.Add(new TransformPosition
|
||||
{
|
||||
StartValue = new Vector2(0, 100),
|
||||
EndValue = new Vector2(100, 100),
|
||||
StartTime = start_time + duration,
|
||||
EndTime = start_time + duration * 2,
|
||||
LoopCount = -1,
|
||||
LoopDelay = duration * 3
|
||||
});
|
||||
container.Transforms.Add(new TransformPosition
|
||||
{
|
||||
StartValue = new Vector2(100, 100),
|
||||
EndValue = new Vector2(100, 0),
|
||||
StartTime = start_time + duration * 2,
|
||||
EndTime = start_time + duration * 3,
|
||||
LoopCount = -1,
|
||||
LoopDelay = duration * 3
|
||||
});
|
||||
container.Transforms.Add(new TransformPosition
|
||||
{
|
||||
StartValue = new Vector2(100, 0),
|
||||
EndValue = Vector2.Zero,
|
||||
StartTime = start_time + duration * 3,
|
||||
EndTime = start_time + duration * 4,
|
||||
LoopCount = -1,
|
||||
LoopDelay = duration * 3
|
||||
});
|
||||
container.MoveTo(new Vector2(0, 100), duration);
|
||||
using (container.BeginDelayedSequence(duration))
|
||||
{
|
||||
container.MoveTo(new Vector2(100, 100), duration);
|
||||
using (container.BeginDelayedSequence(duration))
|
||||
{
|
||||
container.MoveTo(new Vector2(100, 0), duration);
|
||||
using (container.BeginDelayedSequence(duration))
|
||||
container.MoveTo(Vector2.Zero, duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class MyContextMenuContainer : Container, IHasContextMenu
|
||||
|
Reference in New Issue
Block a user