|
@@ -15,6 +15,8 @@ namespace GFGGame
|
|
|
// private int targetType = ArenaFightTargetType.ROBOT;
|
|
|
private FightData roleData;
|
|
|
private FightData targetData;
|
|
|
+ private GameObject _scenePrefab;
|
|
|
+ private GameObject _sceneObject;
|
|
|
// private FightRoleData targetRoleData;
|
|
|
// private FightRobotData targetRobotData;
|
|
|
|
|
@@ -74,8 +76,9 @@ namespace GFGGame
|
|
|
viewCom = _ui.target;
|
|
|
isfullScreen = true;
|
|
|
|
|
|
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("fightBg");
|
|
|
- _ui.m_LoaMask.url = ResPathUtil.GetBgImgPath("fightBg");
|
|
|
+ // _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("fightBg");
|
|
|
+ // _ui.m_LoaMask.url = ResPathUtil.GetBgImgPath("fightBg");
|
|
|
+ _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFightSingleScore"));
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
|
_ui.m_comClick.target.onClick.Add(PartScoreEnd);
|
|
@@ -106,20 +109,16 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
|
|
|
- // targetType = (int)(this.viewData as object[])[0];
|
|
|
roleData = (this.viewData as object[])[0] as FightData;
|
|
|
targetData = (this.viewData as object[])[1] as FightData;
|
|
|
- // targetRobotData = (this.viewData as object[])[3] as FightRobotData;
|
|
|
- if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
|
|
|
- {
|
|
|
- _nTexture = new NTexture(ArenaDataManager.Instance.TextureDic[ArenaDataManager.Instance.CurFightIndex]);
|
|
|
- }
|
|
|
- else
|
|
|
+
|
|
|
+ if (_sceneObject == null)
|
|
|
{
|
|
|
- _nTexture = new NTexture(FightDataManager.Instance.RoleTextuex);
|
|
|
+ _sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
|
+ MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false, null, false);
|
|
|
}
|
|
|
- _ui.m_imgRole.SetSize(GRoot.inst.width, GRoot.inst.height);
|
|
|
- _ui.m_imgRole.texture = _nTexture;
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnItemList(roleData.itemList);
|
|
|
+
|
|
|
|
|
|
_ui.m_btnBack.visible = true;
|
|
|
_isAutoPlay = FightDataManager.Instance.autoPlay;
|
|
@@ -135,7 +134,7 @@ namespace GFGGame
|
|
|
_ui.m_btnSpeedUp.visible = _isAutoPlay;
|
|
|
_ui.m_btnSpeedUp.title = "x" + FightDataManager.Instance.fightSpeed;
|
|
|
_ui.m_comAllPerfect.target.visible = false;
|
|
|
- _ui.m_LoaMask.visible = false;
|
|
|
+ // _ui.m_LoaMask.visible = false;
|
|
|
_ui.m_proScore.m_comBar.target.width = 0;
|
|
|
_ui.m_btnSkip.visible = InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena;
|
|
|
|
|
@@ -479,7 +478,8 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Timers.inst.Add(0.5f, 1, FightEnd);//评分结束
|
|
|
+ Timers.inst.Add(0.3f, 1, Skip);
|
|
|
+ // Timers.inst.Add(0.5f, 1, FightEnd);//评分结束
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -488,18 +488,18 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void FightEnd(object param = null)
|
|
|
- {
|
|
|
- _ui.m_comRoleResult.m_comRole.m_imgRole.SetSize(GRoot.inst.width, GRoot.inst.height);
|
|
|
- _ui.m_comRoleResult.m_comRole.m_imgRole.texture = _nTexture;
|
|
|
- _ui.m_comRoleResult.m_c1.selectedIndex = 0;
|
|
|
+ // private void FightEnd(object param = null)
|
|
|
+ // {
|
|
|
+ // _ui.m_comRoleResult.m_comRole.m_imgRole.SetSize(GRoot.inst.width, GRoot.inst.height);
|
|
|
+ // _ui.m_comRoleResult.m_comRole.m_imgRole.texture = _nTexture;
|
|
|
+ // _ui.m_comRoleResult.m_c1.selectedIndex = 0;
|
|
|
|
|
|
- _ui.m_comRoleResult.m_t0.Play();
|
|
|
- _ui.m_t0.Play(() =>
|
|
|
- {
|
|
|
- Timers.inst.Add(0.3f, 1, Skip);
|
|
|
- });
|
|
|
- }
|
|
|
+ // _ui.m_comRoleResult.m_t0.Play();
|
|
|
+ // _ui.m_t0.Play(() =>
|
|
|
+ // {
|
|
|
+ // Timers.inst.Add(0.3f, 1, Skip);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
|
|
|
private void AllCirclePlayStart()
|
|
|
{
|
|
@@ -578,12 +578,11 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnHide();
|
|
|
Reset();
|
|
|
- // if (_sceneObject != null)
|
|
|
- // {
|
|
|
- // GameObject.Destroy(_sceneObject);
|
|
|
- // _sceneObject = null;
|
|
|
- // }
|
|
|
- // _npcSkillDic.Clear();
|
|
|
+ if (_sceneObject != null)
|
|
|
+ {
|
|
|
+ GameObject.Destroy(_sceneObject);
|
|
|
+ _sceneObject = null;
|
|
|
+ }
|
|
|
|
|
|
Timers.inst.Remove(CheckGuide);
|
|
|
}
|
|
@@ -592,7 +591,7 @@ namespace GFGGame
|
|
|
{
|
|
|
if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
|
|
|
{
|
|
|
- ViewManager.Show<ArenaFightResultView>(new object[] { _score, _targetScore });
|
|
|
+ ViewManager.Show<ArenaFightResultView>(new object[] { _score, _targetScore }, null, true);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -613,13 +612,13 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_t1.Stop(true, false);
|
|
|
|
|
|
- _ui.m_comRoleResult.m_t0.Stop(true, false);
|
|
|
- _ui.m_comRoleResult.m_t1.Stop(true, false);
|
|
|
- _ui.m_comRoleResult.m_t2.Stop(true, false);
|
|
|
- _ui.m_comRoleResult.m_t3.Stop(true, false);
|
|
|
- _ui.m_comRoleResult.m_comRole.m_t0.Stop(true, false);
|
|
|
- _ui.m_comRoleResult.m_comRole.m_imgRole.alpha = 0;
|
|
|
- _ui.m_comRoleResult.target.SetScale(0, 0);
|
|
|
+ // _ui.m_comRoleResult.m_t0.Stop(true, false);
|
|
|
+ // _ui.m_comRoleResult.m_t1.Stop(true, false);
|
|
|
+ // _ui.m_comRoleResult.m_t2.Stop(true, false);
|
|
|
+ // _ui.m_comRoleResult.m_t3.Stop(true, false);
|
|
|
+ // _ui.m_comRoleResult.m_comRole.m_t0.Stop(true, false);
|
|
|
+ // _ui.m_comRoleResult.m_comRole.m_imgRole.alpha = 0;
|
|
|
+ // _ui.m_comRoleResult.target.SetScale(0, 0);
|
|
|
|
|
|
_ui.m_comAllPerfect.m_t0.Stop(true, false);
|
|
|
_ui.m_comAllPerfect.m_t1.Stop(true, false);
|