From eb58dbd3eb5d744457241fe426aa8a66627c0313 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 15 Aug 2023 09:52:16 +0900 Subject: [PATCH] feat: add Start/StopEmission API for UIParticle close #240 --- Scripts/UIParticle.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Scripts/UIParticle.cs b/Scripts/UIParticle.cs index b10c4a8..1cda954 100644 --- a/Scripts/UIParticle.cs +++ b/Scripts/UIParticle.cs @@ -219,6 +219,24 @@ namespace Coffee.UIExtensions particles.Exec(p => p.Stop()); isPaused = true; } + + public void StartEmission() + { + particles.Exec(p => + { + var emission = p.emission; + emission.enabled = true; + }); + } + + public void StopEmission() + { + particles.Exec(p => + { + var emission = p.emission; + emission.enabled = false; + }); + } public void Clear() {