|
@@ -22,13 +22,17 @@ namespace GFGGame
|
|
private NTexture _nTexture;
|
|
private NTexture _nTexture;
|
|
private bool _stopFight = false;
|
|
private bool _stopFight = false;
|
|
|
|
|
|
- // private GameObject _gameObject0;
|
|
|
|
- // private GameObject _gameObject1;
|
|
|
|
- // private GameObject _gameObject2;
|
|
|
|
|
|
+ private GameObject _gameObject0;
|
|
|
|
+ private GameObject _gameObject1;
|
|
|
|
+ private GameObject _gameObject2;
|
|
|
|
+ private GameObject _gameObject3;
|
|
|
|
+ private GameObject _gameObject4;
|
|
|
|
|
|
- // private GoWrapper _wrapper0;
|
|
|
|
- // private GoWrapper _wrapper1;
|
|
|
|
- // private GoWrapper _wrapper2;
|
|
|
|
|
|
+ private GoWrapper _wrapper0;
|
|
|
|
+ private GoWrapper _wrapper1;
|
|
|
|
+ private GoWrapper _wrapper2;
|
|
|
|
+ private GoWrapper _wrapper3;
|
|
|
|
+ private GoWrapper _wrapper4;
|
|
|
|
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
@@ -38,9 +42,11 @@ 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(_gameObject0, _wrapper0);
|
|
|
|
+ SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
|
|
|
|
+ SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
|
|
|
|
+ SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
|
|
|
|
+ SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
|
|
|
|
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
@@ -66,7 +72,20 @@ namespace GFGGame
|
|
_ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("fightBg");
|
|
_ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("fightBg");
|
|
_ui.m_LoaMask.url = ResPathUtil.GetFightBgImgPath("fightBg");
|
|
_ui.m_LoaMask.url = ResPathUtil.GetFightBgImgPath("fightBg");
|
|
|
|
|
|
-
|
|
|
|
|
|
+ AddEffect();
|
|
|
|
+ }
|
|
|
|
+ private void AddEffect()
|
|
|
|
+ {
|
|
|
|
+ string resPath = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_1");
|
|
|
|
+ SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comFirstScore.m_holder, resPath, out _gameObject0, out _wrapper0);
|
|
|
|
+ string resPath1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_2");
|
|
|
|
+ SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comSecondScore.m_holder, resPath1, out _gameObject1, out _wrapper1);
|
|
|
|
+ string resPath2 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_3");
|
|
|
|
+ SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comThirdScore.m_holder, resPath2, out _gameObject2, out _wrapper2);
|
|
|
|
+ string resPath3 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt");
|
|
|
|
+ SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder, resPath3, out _gameObject3, out _wrapper3);
|
|
|
|
+ string resPath4 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_cz");
|
|
|
|
+ SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder1, resPath4, out _gameObject4, out _wrapper4);
|
|
}
|
|
}
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
@@ -96,6 +115,9 @@ namespace GFGGame
|
|
_ui.m_proScore.m_comFirstScore.target.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
_ui.m_proScore.m_comFirstScore.target.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
_ui.m_proScore.m_comSecondScore.target.x = (((float)fightCfg.score2 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
_ui.m_proScore.m_comSecondScore.target.x = (((float)fightCfg.score2 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
_ui.m_proScore.m_comThirdScore.target.x = (((float)fightCfg.score3 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
_ui.m_proScore.m_comThirdScore.target.x = (((float)fightCfg.score3 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
|
|
+ _gameObject0.SetActive(false);
|
|
|
|
+ _gameObject1.SetActive(false);
|
|
|
|
+ _gameObject2.SetActive(false);
|
|
_ui.m_proScore.m_txtCount.text = "总分 0";
|
|
_ui.m_proScore.m_txtCount.text = "总分 0";
|
|
|
|
|
|
_stopFight = false;
|
|
_stopFight = false;
|
|
@@ -178,6 +200,9 @@ namespace GFGGame
|
|
_ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = star > 0 ? 1 : 0;
|
|
_ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = star > 0 ? 1 : 0;
|
|
_ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = star > 1 ? 1 : 0;
|
|
_ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = star > 1 ? 1 : 0;
|
|
_ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = star > 2 ? 1 : 0;
|
|
_ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = star > 2 ? 1 : 0;
|
|
|
|
+ _gameObject0.SetActive(star > 0 ? true : false);
|
|
|
|
+ _gameObject1.SetActive(star > 1 ? true : false);
|
|
|
|
+ _gameObject2.SetActive(star > 2 ? true : false);
|
|
CircleResuleEnd();
|
|
CircleResuleEnd();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -284,6 +309,9 @@ namespace GFGGame
|
|
_ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = 0;
|
|
_ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = 0;
|
|
_ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = 0;
|
|
_ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = 0;
|
|
_ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = 0;
|
|
_ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = 0;
|
|
|
|
+ _gameObject0.SetActive(false);
|
|
|
|
+ _gameObject1.SetActive(false);
|
|
|
|
+ _gameObject2.SetActive(false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|