|
@@ -14,11 +14,42 @@ namespace GFGGame
|
|
|
|
|
|
private GameObject _scenePrefab;
|
|
|
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 StoryFightResultData _resultData;
|
|
|
|
|
|
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);
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -45,8 +76,36 @@ namespace GFGGame
|
|
|
|
|
|
// _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("fightBg");
|
|
|
_scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFightResult"));
|
|
|
+
|
|
|
+ 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);
|
|
|
|
|
|
+ }
|
|
|
protected override void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
@@ -87,7 +146,7 @@ namespace GFGGame
|
|
|
_ui.m_comExpBar.target.visible = false;
|
|
|
Timers.inst.Add(3, 1, OnClickBtnClose);
|
|
|
}
|
|
|
- AddExp();
|
|
|
+ _ui.m_comResult.m_t0.Play(AddExp);
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -100,7 +159,8 @@ namespace GFGGame
|
|
|
}
|
|
|
InstanceZonesDataManager.isResultFighting = false;
|
|
|
MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
|
|
|
-
|
|
|
+ _ui.m_comResult.m_t1.Play();
|
|
|
+ _ui.m_comExpBar.m_proExp.m_comHolder.target.width = 0;
|
|
|
}
|
|
|
|
|
|
private async void OnClickBtnClose(object param)
|
|
@@ -142,9 +202,13 @@ namespace GFGGame
|
|
|
_ui.m_comExpBar.m_txtCurExp.text = exp.ToString();
|
|
|
_ui.m_comExpBar.m_txtAllExp.text = cfgExp.ToString();
|
|
|
|
|
|
- _ui.m_comExpBar.m_proExp.max = cfgExp;
|
|
|
- _ui.m_comExpBar.m_proExp.value = 0;
|
|
|
- _ui.m_comExpBar.m_proExp.TweenValue(exp, 0.2f).OnComplete(() =>
|
|
|
+
|
|
|
+ _ui.m_comExpBar.m_proExp.target.max = cfgExp;
|
|
|
+ _ui.m_comExpBar.m_proExp.target.value = 0;
|
|
|
+ _ui.m_comExpBar.m_proExp.target.TweenValue(exp, 0.2f).OnUpdate((GTweener t) =>
|
|
|
+ {
|
|
|
+ _ui.m_comExpBar.m_proExp.m_comHolder.target.width = t.value.x / cfgExp * _ui.m_comExpBar.m_proExp.m_comHolder.target.initWidth;
|
|
|
+ }).OnComplete(() =>
|
|
|
{
|
|
|
InstanceZonesDataManager.isResultFighting = false;
|
|
|
});
|