You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-16 13:10:07 +00:00
Update demo
This commit is contained in:
@@ -6,38 +6,46 @@ namespace Coffee.UIExtensions.Demo
|
||||
public class UIParticle_Demo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Sprite m_Sprite;
|
||||
[SerializeField] ParticleSystem[] m_ParticleSystems;
|
||||
[SerializeField] Mask[] m_Masks;
|
||||
|
||||
public void SetTimeScale(float scale)
|
||||
[SerializeField] ParticleSystem [] m_ParticleSystems;
|
||||
[SerializeField] Mask [] m_Masks;
|
||||
[SerializeField] Transform m_ScalingByTransform;
|
||||
[SerializeField] UIParticle m_ScalingByUIParticle;
|
||||
|
||||
public void SetTimeScale (float scale)
|
||||
{
|
||||
Time.timeScale = scale;
|
||||
}
|
||||
|
||||
public void EnableTrailRibbon(bool ribbonMode)
|
||||
|
||||
public void EnableTrailRibbon (bool ribbonMode)
|
||||
{
|
||||
foreach(var p in m_ParticleSystems)
|
||||
foreach (var p in m_ParticleSystems)
|
||||
{
|
||||
var trails = p.trails;
|
||||
trails.mode = ribbonMode ? ParticleSystemTrailMode.Ribbon : ParticleSystemTrailMode.PerParticle;
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableSprite(bool enabled)
|
||||
|
||||
public void EnableSprite (bool enabled)
|
||||
{
|
||||
foreach(var p in m_ParticleSystems)
|
||||
foreach (var p in m_ParticleSystems)
|
||||
{
|
||||
var tex = p.textureSheetAnimation;
|
||||
tex.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableMask(bool enabled)
|
||||
|
||||
public void EnableMask (bool enabled)
|
||||
{
|
||||
foreach(var m in m_Masks)
|
||||
foreach (var m in m_Masks)
|
||||
{
|
||||
m.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetScale (float scale)
|
||||
{
|
||||
m_ScalingByTransform.localScale = Vector3.one * (10 * scale);
|
||||
m_ScalingByUIParticle.scale = scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user