mirror of
https://github.com/ppy/osu
synced 2025-02-02 11:21:59 +00:00
Add test coverage of animation restarting
This commit is contained in:
parent
84e73e88d5
commit
dd5b90cf6c
@ -13,17 +13,26 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[TestFixture]
|
||||
public class TestSceneParticleExplosion : OsuTestScene
|
||||
{
|
||||
private ParticleExplosion explosion;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
AddRepeatStep(@"display", () =>
|
||||
AddStep("create initial", () =>
|
||||
{
|
||||
Child = new ParticleExplosion(textures.Get("Cursor/cursortrail"), 150, 1200)
|
||||
Child = explosion = new ParticleExplosion(textures.Get("Cursor/cursortrail"), 150, 1200)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(400)
|
||||
};
|
||||
});
|
||||
|
||||
AddWaitStep("wait for playback", 5);
|
||||
|
||||
AddRepeatStep(@"restart animation", () =>
|
||||
{
|
||||
explosion.Restart();
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user