mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09: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]
|
[TestFixture]
|
||||||
public class TestSceneParticleExplosion : OsuTestScene
|
public class TestSceneParticleExplosion : OsuTestScene
|
||||||
{
|
{
|
||||||
|
private ParticleExplosion explosion;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
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,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(400)
|
Size = new Vector2(400)
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
AddWaitStep("wait for playback", 5);
|
||||||
|
|
||||||
|
AddRepeatStep(@"restart animation", () =>
|
||||||
|
{
|
||||||
|
explosion.Restart();
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user