Skip to content

Commit 0f1af57

Browse files
committed
demo: update demo
1 parent c5317de commit 0f1af57

File tree

2 files changed

+363
-21
lines changed

2 files changed

+363
-21
lines changed

Samples~/Demo/Unmask_Demo.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace Coffee.UIExtensions.Demos
66
public class Unmask_Demo : MonoBehaviour
77
{
88
[SerializeField] Unmask unmask = null;
9+
[SerializeField] Unmask[] smoothingUnmasks = new Unmask[0];
910
[SerializeField] Graphic transition = null;
1011
[SerializeField] Image transitionImage = null;
1112
[SerializeField] Sprite unity_chan = null;
@@ -28,5 +29,13 @@ public void SetTransitionImage(bool flag)
2829
var size = transitionImage.rectTransform.rect.size;
2930
transitionImage.rectTransform.sizeDelta = new Vector2(150, size.y / size.x * 150);
3031
}
32+
33+
public void EnableSmoothing(bool flag)
34+
{
35+
foreach (var unmask in smoothingUnmasks)
36+
{
37+
unmask.edgeSmoothing = flag ? 1 : 0;
38+
}
39+
}
3140
}
3241
}

0 commit comments

Comments
 (0)