|
@@ -29,44 +29,24 @@ namespace GFGGame
|
|
private bool _isAllPerfect = false;//登峰造极中
|
|
private bool _isAllPerfect = false;//登峰造极中
|
|
private bool tryGuide = false;
|
|
private bool tryGuide = false;
|
|
|
|
|
|
- private GameObject _gameObject0;
|
|
|
|
- private GameObject _gameObject1;
|
|
|
|
- private GameObject _gameObject2;
|
|
|
|
- private GameObject _gameObject3;
|
|
|
|
- private GameObject _gameObject4;
|
|
|
|
- private GameObject _gameObject41;
|
|
|
|
- private GameObject _gameObject5;
|
|
|
|
- private GameObject _gameObject6;
|
|
|
|
- private GameObject _gameObject7;
|
|
|
|
- private GameObject _gameObject8;
|
|
|
|
- private GameObject _gameObject9;
|
|
|
|
- private GameObject _gameObject10;
|
|
|
|
- private GameObject _gameObject11;
|
|
|
|
- private GameObject _gameObject12;
|
|
|
|
- private GameObject _gameObject13;
|
|
|
|
- private GameObject _gameObject14;
|
|
|
|
- private GameObject _gameObject15;
|
|
|
|
- private GameObject _gameObject16;
|
|
|
|
-
|
|
|
|
- private GoWrapper _wrapper0;
|
|
|
|
- private GoWrapper _wrapper1;
|
|
|
|
- private GoWrapper _wrapper2;
|
|
|
|
- private GoWrapper _wrapper3;
|
|
|
|
- private GoWrapper _wrapper4;
|
|
|
|
- private GoWrapper _wrapper41;
|
|
|
|
- private GoWrapper _wrapper5;
|
|
|
|
- private GoWrapper _wrapper6;
|
|
|
|
- private GoWrapper _wrapper7;
|
|
|
|
- private GoWrapper _wrapper8;
|
|
|
|
- private GoWrapper _wrapper9;
|
|
|
|
- private GoWrapper _wrapper10;
|
|
|
|
- private GoWrapper _wrapper11;
|
|
|
|
- private GoWrapper _wrapper12;
|
|
|
|
- private GoWrapper _wrapper13;
|
|
|
|
- private GoWrapper _wrapper14;
|
|
|
|
- private GoWrapper _wrapper15;
|
|
|
|
- private GoWrapper _wrapper16;
|
|
|
|
-
|
|
|
|
|
|
+ private EffectUI _effectUI1;
|
|
|
|
+ private EffectUI _effectUI2;
|
|
|
|
+ private EffectUI _effectUI3;
|
|
|
|
+ private EffectUI _effectUI4;
|
|
|
|
+ private EffectUI _effectUI5;
|
|
|
|
+ private EffectUI _effectUI6;
|
|
|
|
+ private EffectUI _effectUI7;
|
|
|
|
+ private EffectUI _effectUI8;
|
|
|
|
+ private EffectUI _effectUI9;
|
|
|
|
+ private EffectUI _effectUI10;
|
|
|
|
+ private EffectUI _effectUI11;
|
|
|
|
+ private EffectUI _effectUI12;
|
|
|
|
+ private EffectUI _effectUI13;
|
|
|
|
+ private EffectUI _effectUI14;
|
|
|
|
+ private EffectUI _effectUI15;
|
|
|
|
+ private EffectUI _effectUI16;
|
|
|
|
+ private EffectUI _effectUI17;
|
|
|
|
+ private EffectUI _effectUI18;
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
@@ -75,25 +55,42 @@ namespace GFGGame
|
|
// GameObject.Destroy(_sceneObject);
|
|
// GameObject.Destroy(_sceneObject);
|
|
// _sceneObject = null;
|
|
// _sceneObject = null;
|
|
// }
|
|
// }
|
|
- SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject41, _wrapper41);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject8, _wrapper8);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject9, _wrapper9);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject10, _wrapper10);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject11, _wrapper11);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject12, _wrapper12);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject13, _wrapper13);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject14, _wrapper14);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject15, _wrapper15);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject16, _wrapper16);
|
|
|
|
-
|
|
|
|
|
|
+ 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;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI6);
|
|
|
|
+ _effectUI6 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI7);
|
|
|
|
+ _effectUI7 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI8);
|
|
|
|
+ _effectUI8 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI9);
|
|
|
|
+ _effectUI9 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI10);
|
|
|
|
+ _effectUI10 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI11);
|
|
|
|
+ _effectUI11 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI12);
|
|
|
|
+ _effectUI12 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI13);
|
|
|
|
+ _effectUI13 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI14);
|
|
|
|
+ _effectUI14 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI15);
|
|
|
|
+ _effectUI15 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI16);
|
|
|
|
+ _effectUI16 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI17);
|
|
|
|
+ _effectUI17 = null;
|
|
|
|
+ EffectUIPool.Recycle(_effectUI18);
|
|
|
|
+ _effectUI18 = null;
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
_ui.Dispose();
|
|
_ui.Dispose();
|
|
@@ -128,47 +125,24 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void AddEffect()
|
|
private void AddEffect()
|
|
{
|
|
{
|
|
- string resPath = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade01");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comFirstScore.m_holder, resPath, out _gameObject0, out _wrapper0);
|
|
|
|
- string resPath1 = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade02");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comSecondScore.m_holder, resPath1, out _gameObject1, out _wrapper1);
|
|
|
|
- string resPath2 = ResPathUtil.GetViewEffectPath("ui_fight_new", "upgrade03");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comThirdScore.m_holder, resPath2, out _gameObject2, out _wrapper2);
|
|
|
|
- string resPath3 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_head");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder, resPath3, out _gameObject3, out _wrapper3);
|
|
|
|
- string resPath4 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_fixed");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder1, resPath4, out _gameObject4, out _wrapper4);
|
|
|
|
- string resPath41 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Progress_liuguang");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comBar.m_holder, resPath41, out _gameObject41, out _wrapper41);
|
|
|
|
-
|
|
|
|
- // string resPath5 = ResPathUtil.GetViewEffectPath("ui_fight_new", "zd_df_dfzj");
|
|
|
|
- // SceneController.AddObjectToView(null, null, _ui.m_comAllPerfect.m_holder, resPath5, out _gameObject5, out _wrapper5);
|
|
|
|
-
|
|
|
|
- string resPath6 = ResPathUtil.GetViewEffectPath("ui_fight_new", "bottom_appear");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderNormal, resPath6, out _gameObject6, out _wrapper6);
|
|
|
|
- string resPath7 = ResPathUtil.GetViewEffectPath("ui_fight_new", "circle");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderCircle, resPath7, out _gameObject7, out _wrapper7);
|
|
|
|
- string resPath8 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Lose_animation");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder0, resPath8, out _gameObject8, out _wrapper8);
|
|
|
|
- string resPath9 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Good_animation");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder1, resPath9, out _gameObject9, out _wrapper9);
|
|
|
|
- string resPath10 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Perfect_animation");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holder2, resPath10, out _gameObject10, out _wrapper10);
|
|
|
|
- string resPath11 = ResPathUtil.GetViewEffectPath("ui_fight_new", "Tail");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderResult, resPath11, out _gameObject11, out _wrapper11);
|
|
|
|
- string resPath12 = ResPathUtil.GetViewEffectPath("ui_fight_new", "botton_Highlight");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comResult.m_holderHigh, resPath12, out _gameObject12, out _wrapper12);
|
|
|
|
-
|
|
|
|
- string resPath13 = ResPathUtil.GetViewEffectPath("ui_fight_new", "loop_tx");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderLoop, resPath13, out _gameObject13, out _wrapper13);
|
|
|
|
- string resPath14 = ResPathUtil.GetViewEffectPath("ui_fight_new", "3S_textAppear01");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holder, resPath14, out _gameObject14, out _wrapper14);
|
|
|
|
- string resPath15 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_Approach");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, resPath15, out _gameObject15, out _wrapper15);
|
|
|
|
- string resPath16 = ResPathUtil.GetViewEffectPath("ui_fight_new", "smoke_out");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, resPath16, out _gameObject16, out _wrapper16);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comFirstScore.m_holder, "ui_fight_new", "upgrade01");
|
|
|
|
+ _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comSecondScore.m_holder, "ui_fight_new", "upgrade02");
|
|
|
|
+ _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comThirdScore.m_holder, "ui_fight_new", "upgrade03");
|
|
|
|
+ _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder, "ui_fight_new", "Progress_head");
|
|
|
|
+ _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_holder1, "ui_fight_new", "Progress_fixed");
|
|
|
|
+ _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_proScore.m_comBar.m_holder, "ui_fight_new", "Progress_liuguang");
|
|
|
|
+ //_effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comAllPerfect.m_holder, "ui_fight_new", "zd_df_dfzj");
|
|
|
|
+ _effectUI8 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderNormal, "ui_fight_new", "bottom_appear");
|
|
|
|
+ _effectUI9 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderCircle, "ui_fight_new", "circle");
|
|
|
|
+ _effectUI10 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder0, "ui_fight_new", "Lose_animation");
|
|
|
|
+ _effectUI11 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder1, "ui_fight_new", "Good_animation");
|
|
|
|
+ _effectUI12 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holder2, "ui_fight_new", "Perfect_animation");
|
|
|
|
+ _effectUI13 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderResult, "ui_fight_new", "Tail");
|
|
|
|
+ _effectUI14 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comResult.m_holderHigh, "ui_fight_new", "botton_Highlight");
|
|
|
|
+ _effectUI15 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderLoop, "ui_fight_new", "loop_tx");
|
|
|
|
+ _effectUI16 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holder, "ui_fight_new", "3S_textAppear01");
|
|
|
|
+ _effectUI17 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeIn, "ui_fight_new", "smoke_Approach");
|
|
|
|
+ _effectUI18 = EffectUIPool.CreateEffectUI(_ui.m_comClick.m_comAllPerfect.m_holderSmokeOut, "ui_fight_new", "smoke_out");
|
|
}
|
|
}
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|