You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-15 04:30:09 +00:00
resharp
This commit is contained in:
@@ -1,30 +1,37 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Coffee.UIExtensions.Demo
|
||||
{
|
||||
public class UIParticle_Demo_UIParticleController : MonoBehaviour
|
||||
{
|
||||
public Transform root;
|
||||
[FormerlySerializedAs("root")]
|
||||
[SerializeField]
|
||||
private Transform m_RootTransform;
|
||||
|
||||
public void UIParticle_MeshSharing(bool enabled)
|
||||
public void UIParticle_MeshSharing(bool flag)
|
||||
{
|
||||
foreach (var uip in root.GetComponentsInChildren<UIParticle>(true))
|
||||
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
|
||||
{
|
||||
uip.meshSharing = enabled ? UIParticle.MeshSharing.Auto : UIParticle.MeshSharing.None;
|
||||
uip.meshSharing = flag
|
||||
? UIParticle.MeshSharing.Auto
|
||||
: UIParticle.MeshSharing.None;
|
||||
}
|
||||
}
|
||||
|
||||
public void UIParticle_RandomGroup(bool enabled)
|
||||
public void UIParticle_RandomGroup(bool flag)
|
||||
{
|
||||
foreach (var uip in root.GetComponentsInChildren<UIParticle>(true))
|
||||
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
|
||||
{
|
||||
uip.groupMaxId = enabled ? 4 : 0;
|
||||
uip.groupMaxId = flag
|
||||
? 4
|
||||
: 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void UIParticle_Scale(float scale)
|
||||
{
|
||||
foreach (var uip in root.GetComponentsInChildren<UIParticle>(true))
|
||||
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
|
||||
{
|
||||
uip.scale = scale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user