<commit_before>// Copyright (c) <NAME> Ltd <<EMAIL>>. 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
    {
        [BackgroundDependencyLoader]
        private void load(TextureStore textures)
        {
            AddRepeatStep(@"display", () =>
            {
                Child = new ParticleExplosion(textures.Get("Cursor/cursortrail"), 150, 1200)
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Size = new Vector2(400)
                };
            }, 10);
        }
    }
}<commit_msg>Add test coverage of animation restarting<commit_after>// Copyright (c) <NAME> Ltd <<EMAIL>>. 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
    {
        private ParticleExplosion explosion;

        [BackgroundDependencyLoader]
        private void load(TextureStore textures)
        {
            AddStep("create initial", () =>
            {
                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);
        }
    }
}
{'fraction_non_alphanumeric': 0.09615384615384616, 'fraction_numerical': 0.012980769230769231, 'mean_word_length': 2.0028860028860027, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7389949', 'n_tokens_mistral': 615, 'n_tokens_neox': 552, 'n_words': 139}