|
@@ -21,11 +21,8 @@ namespace GFGGame
|
|
|
private UI_StoryFightResultUI _ui;
|
|
|
private GameObject _sceneObject;
|
|
|
private GameObject _scenePrefab;
|
|
|
- private List<ItemData> _currentBonusList;
|
|
|
-
|
|
|
- private bool result = false;
|
|
|
- private bool _fistPassLastLvl = false;
|
|
|
|
|
|
+ private StoryFightResultData _resultData;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -69,11 +66,6 @@ namespace GFGGame
|
|
|
{
|
|
|
_sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
|
}
|
|
|
- _currentBonusList = resultData.BonusList;
|
|
|
- //判断是否是首次打通最后一关
|
|
|
- int nextLevelID = StoryDataManager.currentLevelCfgId + 1;
|
|
|
- StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
|
|
|
- _fistPassLastLvl = (nextLevelCfg == null) && resultData.FirstPass;
|
|
|
|
|
|
SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
|
|
|
_ui.m_selfScore.m_txtScore.text = "" + resultData.Score;
|
|
@@ -82,12 +74,11 @@ namespace GFGGame
|
|
|
_ui.m_expBar.m_pbExp.max = roleLevelCfg.exp;
|
|
|
_ui.m_expBar.m_pbExp.value = GameGlobal.myNumericComponent.GetAsInt(NumericType.Exp);
|
|
|
|
|
|
- result = resultData.Result;
|
|
|
StoryUtil.UpdateStar(resultData.Star, _ui.m_selfScore.m_flower.target);
|
|
|
_ui.m_selfScore.m_bg.url = "ui://Main/zd_jsjm_jszi_" + resultData.Star;
|
|
|
TextFormat tf = _ui.m_selfScore.m_txtScore.textFormat;
|
|
|
UpdateToCheckGuide(null);
|
|
|
- if (!result)
|
|
|
+ if (!_resultData.Result)
|
|
|
{
|
|
|
tf.font = "ui://Main/Font3";
|
|
|
_ui.m_expBar.m_txtLvlAdded.text = "0";
|
|
@@ -118,22 +109,14 @@ namespace GFGGame
|
|
|
GameObject.Destroy(_sceneObject);
|
|
|
_sceneObject = null;
|
|
|
}
|
|
|
- _currentBonusList = null;
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnClose()
|
|
|
{
|
|
|
this.Hide();
|
|
|
- if (_fistPassLastLvl)
|
|
|
- {
|
|
|
- ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
|
|
|
- }
|
|
|
+ StoryController.OnFinishStoryLevel(StoryDataManager.currentLevelCfgId, _resultData.FirstPass);
|
|
|
//尝试显示奖励
|
|
|
- BonusController.TryShowBonusList(_currentBonusList);
|
|
|
+ BonusController.TryShowBonusList(_resultData.BonusList);
|
|
|
StoryDataManager.currentCardId = -1;
|
|
|
}
|
|
|
|
|
@@ -152,9 +135,9 @@ namespace GFGGame
|
|
|
protected override void UpdateToCheckGuide(object param)
|
|
|
{
|
|
|
if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
|
- if (!result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_FAILED, 1, "不要气馁呀,可以通过再次挑战已通关的关卡、摘星、绣坊等途径获取更多的物资来提升自己的战斗力哦!", false, 0, true, false, (int)(this.viewCom.height - 150));
|
|
|
- if (result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_SINGLE_WIN, 1, "这条连衣裙可真好看!点击空白区域继续", false, 0, true, false, (int)(this.viewCom.height - 150));
|
|
|
- if (result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_TARGET_WIN, 1, "你太厉害了,初次对战就获得了这么好的战绩,继续加油吧", false, 0, true, false, (int)(this.viewCom.height - 350));
|
|
|
+ if (!_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_FAILED, 1, "不要气馁呀,可以通过再次挑战已通关的关卡、摘星、绣坊等途径获取更多的物资来提升自己的战斗力哦!", false, 0, true, false, (int)(this.viewCom.height - 150));
|
|
|
+ if (_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_SINGLE_WIN, 1, "这条连衣裙可真好看!点击空白区域继续", false, 0, true, false, (int)(this.viewCom.height - 150));
|
|
|
+ if (_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_TARGET_WIN, 1, "你太厉害了,初次对战就获得了这么好的战绩,继续加油吧", false, 0, true, false, (int)(this.viewCom.height - 350));
|
|
|
}
|
|
|
|
|
|
protected override void TryCompleteGuide()
|