Update demo

This commit is contained in:
mob-sakai
2018-12-12 22:29:07 +09:00
parent 56d949e028
commit bd058b29e1
9 changed files with 16147 additions and 778 deletions

View File

@@ -1,4 +1,5 @@
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using System.Collections.Generic;
@@ -37,7 +38,15 @@ namespace Coffee.UIExtensions.Demo
public void EnableMask (bool enabled)
{
foreach (var m in m_Masks)
foreach (var m in FindObjectsOfType<Mask> ())
{
m.enabled = enabled;
}
}
public void EnableMask2D (bool enabled)
{
foreach (var m in FindObjectsOfType<RectMask2D> ())
{
m.enabled = enabled;
}
@@ -48,5 +57,18 @@ namespace Coffee.UIExtensions.Demo
m_ScalingByTransforms.ForEach (x => x.localScale = Vector3.one * (10 * scale));
m_ScalingByUIParticles.ForEach (x => x.scale = scale);
}
public void SetUIParticleScale(float scale)
{
foreach(var uip in FindObjectsOfType<UIParticle>())
{
uip.scale = scale;
}
}
public void LoadScene(string name)
{
SceneManager.LoadScene (name);
}
}
}