You've already forked taptap2024_GJ_chidouren
27 lines
869 B
C#
27 lines
869 B
C#
using System;
|
|
using Framework.UI;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace Views.Common
|
|
{
|
|
public class CommonBlurEffectTable: IcecreamView.IC_AbstractModule
|
|
{
|
|
public BlurEffectType BlurEffectType = BlurEffectType.Blur;
|
|
private float EffectDuration = 0.2f;
|
|
|
|
public override void OnFocusActive ()
|
|
{
|
|
CameraEffectUtils.Instance.SetGameCamBlur (1 , this.EffectDuration , null , this.BlurEffectType);
|
|
}
|
|
|
|
public override void OnFocusInactive ()
|
|
{
|
|
if (UIManager.Instance.CurFocusView != null && UIManager.Instance.CurFocusView.GetComponent<CommonBlurEffectTable> () != null)
|
|
{
|
|
return;
|
|
}
|
|
CameraEffectUtils.Instance.SetGameCamBlur (0 , this.EffectDuration , null , this.BlurEffectType);
|
|
}
|
|
}
|
|
} |