summaryrefslogtreecommitdiff
path: root/Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-04-07 21:13:03 +0800
committerchai <chaifix@163.com>2021-04-07 21:13:03 +0800
commitd69611d66431e28ea35477c6781a00d57ae04fa3 (patch)
treec76b3147642a6d1749406f25f2fdacce4ba7a272 /Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs
parentc7e2d8f773baa3955f17402b842eb43329c5f3a0 (diff)
*因为没有meta,导致missing,删除UIEffect
Diffstat (limited to 'Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs')
-rw-r--r--Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs68
1 files changed, 0 insertions, 68 deletions
diff --git a/Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs b/Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs
deleted file mode 100644
index 5125eda..0000000
--- a/Assets/Test/UIEffect/Samples/Demo/UIEffect_Demo.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Coffee.UIEffects
-{
- public class UIEffect_Demo : MonoBehaviour
- {
- // Use this for initialization
- void Start()
- {
- GetComponentInChildren<RectMask2D>().enabled = true;
- }
-
- public void SetTimeScale(float scale)
- {
- Time.timeScale = scale;
- }
-
- public void Open(Animator anim)
- {
- // anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
- anim.gameObject.SetActive(true);
- anim.SetTrigger("Open");
- }
-
- public void Close(Animator anim)
- {
- anim.SetTrigger("Close");
- }
-
- public void Capture(Animator anim)
- {
- // anim.GetComponentInChildren<UIEffectCapturedImage>().Capture();
- anim.SetTrigger("Capture");
- }
-
- public void SetCanvasOverlay(bool isOverlay)
- {
- GetComponent<Canvas>().renderMode =
- isOverlay ? RenderMode.ScreenSpaceOverlay : RenderMode.ScreenSpaceCamera;
- }
-
- public void SetRenderMode(int mode)
- {
- var canvas = GetComponent<Canvas>();
- var cam = canvas.worldCamera;
- var pos = new Vector3(0, 0, -25);
- var rot = new Vector3(0, 0, 0);
-
- if ((RenderMode) mode == RenderMode.WorldSpace)
- {
- SetRenderMode((int) RenderMode.ScreenSpaceCamera);
- canvas.renderMode = RenderMode.WorldSpace;
- pos.x = 45;
- rot.y = -20;
- }
- else
- {
- canvas.renderMode = (RenderMode) mode;
- }
-
- cam.transform.SetPositionAndRotation(pos, Quaternion.Euler(rot));
- }
- }
-}