2020-11-19 05:54:31 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Textures;
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public class TestSceneParticleExplosion : OsuTestScene
|
|
|
|
{
|
2020-11-19 09:07:41 +00:00
|
|
|
private ParticleExplosion explosion;
|
|
|
|
|
2020-11-19 05:54:31 +00:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(TextureStore textures)
|
|
|
|
{
|
2020-11-19 09:07:41 +00:00
|
|
|
AddStep("create initial", () =>
|
2020-11-19 05:54:31 +00:00
|
|
|
{
|
2020-11-19 09:07:41 +00:00
|
|
|
Child = explosion = new ParticleExplosion(textures.Get("Cursor/cursortrail"), 150, 1200)
|
2020-11-19 05:54:31 +00:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
2020-11-19 08:16:29 +00:00
|
|
|
Size = new Vector2(400)
|
2020-11-19 05:54:31 +00:00
|
|
|
};
|
2020-11-19 09:07:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
AddWaitStep("wait for playback", 5);
|
|
|
|
|
|
|
|
AddRepeatStep(@"restart animation", () =>
|
|
|
|
{
|
|
|
|
explosion.Restart();
|
2020-11-19 08:16:29 +00:00
|
|
|
}, 10);
|
2020-11-19 05:54:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|