|
@@ -23,6 +23,7 @@ namespace GFGGame
|
|
|
private float _playTime = 1.25f;
|
|
|
|
|
|
private GameObject _gameObject0;
|
|
|
+ private GameObject _gameObject1;
|
|
|
|
|
|
protected override void OnInit()
|
|
|
{
|
|
@@ -61,7 +62,7 @@ namespace GFGGame
|
|
|
StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
|
|
|
StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
|
|
|
_ui.m_proScore.target.max = fightCfg.score3;
|
|
|
- _ui.m_proScore.target.value = 0;
|
|
|
+ _ui.m_proScore.m_comBar.target.width = 0;
|
|
|
_ui.m_proScore.m_imgFirstScore.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
|
|
|
|
|
|
_index = 0;
|
|
@@ -249,8 +250,15 @@ namespace GFGGame
|
|
|
{
|
|
|
EquipDataCache.cacher.totalScore = (int)Math.Round(_score);
|
|
|
_ui.m_proScore.m_txtCount.text = "总分:" + Math.Round(_score).ToString();
|
|
|
- _ui.m_proScore.target.TweenValue(_score, 0.2f);
|
|
|
+ // _ui.m_proScore.target.TweenValue(_score, 0.2f);
|
|
|
|
|
|
+ double proportion = _score / _ui.m_proScore.target.max;//(_score + _ui.m_proScore.target.max) > 0 ? _score / (_score + _ui.m_proScore.target.max) : 0;
|
|
|
+ float width = (float)(proportion * _ui.m_proScore.target.width);
|
|
|
+ width = width > _ui.m_proScore.m_comBar.target.initWidth ? _ui.m_proScore.m_comBar.target.initWidth : width;
|
|
|
+ GTween.To(_ui.m_proScore.m_comBar.target.width, width, 0.5f).SetTarget(_ui.m_proScore.m_comBar).OnUpdate((GTweener t) =>
|
|
|
+ {
|
|
|
+ _ui.m_proScore.m_comBar.target.width = t.value.x;
|
|
|
+ }); ;
|
|
|
}
|
|
|
private void OnBtnSpeedUp()
|
|
|
{
|
|
@@ -285,7 +293,7 @@ namespace GFGGame
|
|
|
private void PlayScoreTWEffect()
|
|
|
{
|
|
|
_ui.m_holderPartScore.visible = true;
|
|
|
- Vector3 endVaule = _ui.m_proScore.target.GetChild("ani").asImage.LocalToGlobal(Vector2.zero);
|
|
|
+ Vector3 endVaule = _ui.m_proScore.target.position + new Vector3(_ui.m_proScore.m_comBar.target.width, 0, 0);
|
|
|
GTween.To(_ui.m_comClickCircle.target.position, endVaule, 0.5f).SetTarget(_ui.m_holderPartScore).OnUpdate((GTweener t) =>
|
|
|
{
|
|
|
_ui.m_holderPartScore.position = t.value.vec2;
|
|
@@ -299,6 +307,8 @@ namespace GFGGame
|
|
|
{
|
|
|
string resPath0 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_tw");
|
|
|
SceneController.AddObjectToView(_gameObject0, null, _ui.m_holderPartScore, resPath0, out _gameObject0, out GoWrapper _wrapper0);
|
|
|
+ string resPath1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt");
|
|
|
+ SceneController.AddObjectToView(_gameObject1, null, _ui.m_proScore.m_comBar.m_holder, resPath1, out _gameObject1, out GoWrapper _wrapper6);
|
|
|
}
|
|
|
protected override void OnHide()
|
|
|
{
|
|
@@ -319,6 +329,7 @@ namespace GFGGame
|
|
|
_scenePrefab = null;
|
|
|
}
|
|
|
SceneController.DestroyObjectFromView(_gameObject0);
|
|
|
+ SceneController.DestroyObjectFromView(_gameObject1);
|
|
|
|
|
|
base.Dispose();
|
|
|
|