|
@@ -14,42 +14,47 @@ namespace GFGGame
|
|
|
|
|
|
private GameObject _scenePrefab;
|
|
private GameObject _scenePrefab;
|
|
private GameObject _sceneObject;
|
|
private GameObject _sceneObject;
|
|
- private GameObject _gameObject0;
|
|
|
|
- private GameObject _gameObject1;
|
|
|
|
- private GameObject _gameObject2;
|
|
|
|
- private GameObject _gameObject3;
|
|
|
|
- private GameObject _gameObject4;
|
|
|
|
- private GameObject _gameObject5;
|
|
|
|
- private GameObject _gameObject6;
|
|
|
|
- private GameObject _gameObject7;
|
|
|
|
- private GameObject _gameObject8;
|
|
|
|
- private GameObject _gameObject9;
|
|
|
|
- private GameObject _gameObject10;
|
|
|
|
- private GameObject _gameObject11;
|
|
|
|
- private GoWrapper _wrapper0;
|
|
|
|
- private GoWrapper _wrapper1;
|
|
|
|
- private GoWrapper _wrapper2;
|
|
|
|
- private GoWrapper _wrapper3;
|
|
|
|
- private GoWrapper _wrapper4;
|
|
|
|
- private GoWrapper _wrapper5;
|
|
|
|
- private GoWrapper _wrapper6;
|
|
|
|
- private GoWrapper _wrapper7;
|
|
|
|
- private GoWrapper _wrapper8;
|
|
|
|
- private GoWrapper _wrapper9;
|
|
|
|
- private GoWrapper _wrapper10;
|
|
|
|
- private GoWrapper _wrapper11;
|
|
|
|
|
|
+ private EffectUI _effectUI0;
|
|
|
|
+ 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 StoryFightResultData _resultData;
|
|
private StoryFightResultData _resultData;
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
- SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
|
|
|
|
|
|
+ EffectUIPool.Recycle(_effectUI0);
|
|
|
|
+ _effectUI0 = null;
|
|
|
|
+ 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;
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
_ui.Dispose();
|
|
_ui.Dispose();
|
|
@@ -81,30 +86,18 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void AddEffect()
|
|
private void AddEffect()
|
|
{
|
|
{
|
|
- string resPath0 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_lose");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult0, resPath0, out _gameObject0, out _wrapper0);
|
|
|
|
- string resPath1 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_qualified");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult1, resPath1, out _gameObject1, out _wrapper1);
|
|
|
|
- string resPath2 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_good");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult2, resPath2, out _gameObject2, out _wrapper2);
|
|
|
|
- string resPath3 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_Perfect");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderResult3, resPath3, out _gameObject3, out _wrapper3);
|
|
|
|
- string resPath4 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_Text_kuang");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderScore, resPath4, out _gameObject4, out _wrapper4);
|
|
|
|
- string resPath5 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_STAR");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar3, resPath5, out _gameObject7, out _wrapper7);
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar2, resPath5, out _gameObject6, out _wrapper6);
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comResult.m_holderStar1, resPath5, out _gameObject5, out _wrapper5);
|
|
|
|
-
|
|
|
|
- string resPath8 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_jindu_di");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comExpBar.m_holderProHead, resPath8, out _gameObject8, out _wrapper8);
|
|
|
|
- string resPath9 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_jindu_head");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comExpBar.m_proExp.m_holder, resPath9, out _gameObject9, out _wrapper9);
|
|
|
|
- string resPath10 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_jindu_tx");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comExpBar.m_proExp.m_comHolder.m_holder, resPath10, out _gameObject10, out _wrapper10);
|
|
|
|
- string resPath11 = ResPathUtil.GetViewEffectPath("ui_fight_new", "ZDJS_player");
|
|
|
|
- SceneController.AddObjectToView(null, null, _ui.m_comExpBar.m_holderHead, resPath11, out _gameObject11, out _wrapper11);
|
|
|
|
-
|
|
|
|
|
|
+ _effectUI0 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult0, "ui_fight_new", "ZDJS_lose");
|
|
|
|
+ _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult1, "ui_fight_new", "ZDJS_qualified");
|
|
|
|
+ _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult2, "ui_fight_new", "ZDJS_good");
|
|
|
|
+ _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderResult3, "ui_fight_new", "ZDJS_Perfect");
|
|
|
|
+ _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderScore, "ui_fight_new", "ZDJS_Text_kuang");
|
|
|
|
+ _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar3, "ui_fight_new", "ZDJS_STAR");
|
|
|
|
+ _effectUI6 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar2, "ui_fight_new", "ZDJS_STAR");
|
|
|
|
+ _effectUI7 = EffectUIPool.CreateEffectUI(_ui.m_comResult.m_holderStar1, "ui_fight_new", "ZDJS_STAR");
|
|
|
|
+ _effectUI8 = EffectUIPool.CreateEffectUI(_ui.m_comExpBar.m_holderProHead, "ui_fight_new", "ZDJS_jindu_di");
|
|
|
|
+ _effectUI9 = EffectUIPool.CreateEffectUI(_ui.m_comExpBar.m_proExp.m_holder, "ui_fight_new", "ZDJS_jindu_head");
|
|
|
|
+ _effectUI10 = EffectUIPool.CreateEffectUI(_ui.m_comExpBar.m_proExp.m_comHolder.m_holder, "ui_fight_new", "ZDJS_jindu_tx");
|
|
|
|
+ _effectUI11 = EffectUIPool.CreateEffectUI(_ui.m_comExpBar.m_holderHead, "ui_fight_new", "ZDJS_player");
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|