Refactor
parent
4ca676ccea
commit
4397ff5a44
|
@ -1,5 +1,6 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Coffee.UIExtensions.Demo
|
namespace Coffee.UIExtensions.Demo
|
||||||
{
|
{
|
||||||
|
@ -8,8 +9,8 @@ namespace Coffee.UIExtensions.Demo
|
||||||
[SerializeField] Sprite m_Sprite;
|
[SerializeField] Sprite m_Sprite;
|
||||||
[SerializeField] ParticleSystem [] m_ParticleSystems;
|
[SerializeField] ParticleSystem [] m_ParticleSystems;
|
||||||
[SerializeField] Mask [] m_Masks;
|
[SerializeField] Mask [] m_Masks;
|
||||||
[SerializeField] Transform m_ScalingByTransform;
|
[SerializeField] List<Transform> m_ScalingByTransforms;
|
||||||
[SerializeField] UIParticle m_ScalingByUIParticle;
|
[SerializeField] List<UIParticle> m_ScalingByUIParticles;
|
||||||
|
|
||||||
public void SetTimeScale (float scale)
|
public void SetTimeScale (float scale)
|
||||||
{
|
{
|
||||||
|
@ -44,8 +45,8 @@ namespace Coffee.UIExtensions.Demo
|
||||||
|
|
||||||
public void SetScale (float scale)
|
public void SetScale (float scale)
|
||||||
{
|
{
|
||||||
m_ScalingByTransform.localScale = Vector3.one * (10 * scale);
|
m_ScalingByTransforms.ForEach (x => x.localScale = Vector3.one * (10 * scale));
|
||||||
m_ScalingByUIParticle.scale = scale;
|
m_ScalingByUIParticles.ForEach (x => x.scale = scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,6 @@ namespace Coffee.UIExtensions
|
||||||
//################################
|
//################################
|
||||||
static readonly GUIContent contentParticleMaterial = new GUIContent ("Particle Material", "The material for rendering particles");
|
static readonly GUIContent contentParticleMaterial = new GUIContent ("Particle Material", "The material for rendering particles");
|
||||||
static readonly GUIContent contentTrailMaterial = new GUIContent ("Trail Material", "The material for rendering particle trails");
|
static readonly GUIContent contentTrailMaterial = new GUIContent ("Trail Material", "The material for rendering particle trails");
|
||||||
static readonly List<UIParticle> s_UIParticles = new List<UIParticle> ();
|
|
||||||
static readonly List<ParticleSystem> s_ParticleSystems = new List<ParticleSystem> ();
|
static readonly List<ParticleSystem> s_ParticleSystems = new List<ParticleSystem> ();
|
||||||
|
|
||||||
//################################
|
//################################
|
||||||
|
|
Loading…
Reference in New Issue