|
@@ -3,16 +3,31 @@ using ET;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
using UI.Studio;
|
|
using UI.Studio;
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
public class StudioView : BaseWindow
|
|
public class StudioView : BaseWindow
|
|
{
|
|
{
|
|
private UI_StudioUI _ui;
|
|
private UI_StudioUI _ui;
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ private EffectUI _effectUI1;
|
|
|
|
+ private EffectUI _effectUI2;
|
|
|
|
+ private EffectUI _effectUI3;
|
|
|
|
+ private EffectUI _effectUI4;
|
|
|
|
+ private EffectUI _effectUI5;
|
|
|
|
+ private Dictionary<string, UI_ComEctype> comEctypeDic = new Dictionary<string, UI_ComEctype>();
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
|
|
+ EffectUIPool.Recycle(_effectUI1);
|
|
|
|
+ _effectUI1 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI2);
|
|
|
|
+ _effectUI2 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI3);
|
|
|
|
+ _effectUI3 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI4);
|
|
|
|
+ _effectUI4 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI5);
|
|
|
|
+ _effectUI5 = null;
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
_ui.Dispose();
|
|
_ui.Dispose();
|
|
@@ -38,6 +53,18 @@ namespace GFGGame
|
|
_ui.m_comProperty.target.onClick.Add(OnComProperty);
|
|
_ui.m_comProperty.target.onClick.Add(OnComProperty);
|
|
_ui.m_comFiling.target.onClick.Add(OnClickComFilling);
|
|
_ui.m_comFiling.target.onClick.Add(OnClickComFilling);
|
|
_ui.m_comPorcelain.target.onClick.Add(OnComPorceLain);
|
|
_ui.m_comPorcelain.target.onClick.Add(OnComPorceLain);
|
|
|
|
+
|
|
|
|
+ comEctypeDic.Add(typeof(StudioMetalView).FullName, _ui.m_comMetal);
|
|
|
|
+ comEctypeDic.Add(typeof(StudioFabricView).FullName, _ui.m_comFabric);
|
|
|
|
+ comEctypeDic.Add(typeof(StudioPropertyView).FullName, _ui.m_comProperty);
|
|
|
|
+ comEctypeDic.Add(typeof(StudioFilingView).FullName, _ui.m_comFiling);
|
|
|
|
+ comEctypeDic.Add(typeof(StudioPorcelainView).FullName, _ui.m_comPorcelain);
|
|
|
|
+
|
|
|
|
+ _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comFiling.m_effect, "ui_Small_parts", "YaJi_TuBiao");
|
|
|
|
+ _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_comMetal.m_effect, "ui_Small_parts", "YaJi_TuBiao");
|
|
|
|
+ _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_comFabric.m_effect, "ui_Small_parts", "YaJi_TuBiao");
|
|
|
|
+ _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comProperty.m_effect, "ui_Small_parts", "YaJi_TuBiao");
|
|
|
|
+ _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comPorcelain.m_effect, "ui_Small_parts", "YaJi_TuBiao");
|
|
}
|
|
}
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
@@ -48,16 +75,35 @@ namespace GFGGame
|
|
{
|
|
{
|
|
base.OnShown();//1;//
|
|
base.OnShown();//1;//
|
|
StudioSProxy.ReqStudioInfos().Coroutine();
|
|
StudioSProxy.ReqStudioInfos().Coroutine();
|
|
- int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, false) ? 1 : 0;
|
|
|
|
- _ui.m_comMetal.m_c1.selectedIndex = isopen;
|
|
|
|
- isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, false) ? 1 : 0; ;
|
|
|
|
- _ui.m_comFabric.m_c1.selectedIndex = isopen;
|
|
|
|
- isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName, false) ? 1 : 0;
|
|
|
|
- _ui.m_comProperty.m_c1.selectedIndex = isopen;
|
|
|
|
- isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFilingView).FullName, false) ? 1 : 0;
|
|
|
|
- _ui.m_comFiling.m_c1.selectedIndex = isopen;
|
|
|
|
- isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPorcelainView).FullName, false) ? 1 : 0;
|
|
|
|
- _ui.m_comPorcelain.m_c1.selectedIndex = isopen;
|
|
|
|
|
|
+ //int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName, false) ? 1 : 0;
|
|
|
|
+ //_ui.m_comMetal.m_c1.selectedIndex = isopen;
|
|
|
|
+ //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName, false) ? 1 : 0; ;
|
|
|
|
+ //_ui.m_comFabric.m_c1.selectedIndex = isopen;
|
|
|
|
+ //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName, false) ? 1 : 0;
|
|
|
|
+ //_ui.m_comProperty.m_c1.selectedIndex = isopen;
|
|
|
|
+ //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFilingView).FullName, false) ? 1 : 0;
|
|
|
|
+ //_ui.m_comFiling.m_c1.selectedIndex = isopen;
|
|
|
|
+ //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPorcelainView).FullName, false) ? 1 : 0;
|
|
|
|
+ //_ui.m_comPorcelain.m_c1.selectedIndex = isopen;
|
|
|
|
+
|
|
|
|
+ int isopen = 1;
|
|
|
|
+ foreach(var com in comEctypeDic)
|
|
|
|
+ {
|
|
|
|
+ isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(com.Key, false) ? 1 : 0;
|
|
|
|
+ com.Value.m_c1.selectedIndex = isopen;
|
|
|
|
+ if(isopen == 0)
|
|
|
|
+ {
|
|
|
|
+ com.Value.m_effect.visible = false;
|
|
|
|
+ com.Value.m_bg.visible = true;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ com.Value.m_bg.visible = false;
|
|
|
|
+ com.Value.m_t0.Play();
|
|
|
|
+ com.Value.m_effect.visible = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("ejzjm_bj");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("ejzjm_bj");
|
|
UpdateRedDot();
|
|
UpdateRedDot();
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
Timers.inst.AddUpdate(CheckGuide);
|