|
@@ -12,11 +12,11 @@ namespace GFGGame
|
|
private GameObject _sceneObject;
|
|
private GameObject _sceneObject;
|
|
private GameObject _scenePrefab;
|
|
private GameObject _scenePrefab;
|
|
private int _index;//当前评分part
|
|
private int _index;//当前评分part
|
|
- private double _score;//当前总分数
|
|
|
|
|
|
+ private int _score;//当前总分数
|
|
private double _skillScore = 0;//当前卡牌技能分
|
|
private double _skillScore = 0;//当前卡牌技能分
|
|
|
|
+ private int _partScore = 0;//当前部件分+技能评分(_skillScore)
|
|
private bool _showCard = false;//当前是否显示卡牌技能
|
|
private bool _showCard = false;//当前是否显示卡牌技能
|
|
private double _mainScore;//总主属性分
|
|
private double _mainScore;//总主属性分
|
|
- private int _prefectCount = 0;//卓越点击数量
|
|
|
|
private const int _range = 100;//圆圈随机范围
|
|
private const int _range = 100;//圆圈随机范围
|
|
private const float _prefectScale = 60f;//完美缩放比
|
|
private const float _prefectScale = 60f;//完美缩放比
|
|
private float _time = 0;// 登峰造极按住的时间
|
|
private float _time = 0;// 登峰造极按住的时间
|
|
@@ -24,22 +24,14 @@ namespace GFGGame
|
|
private float _playTime = 2.5f;
|
|
private float _playTime = 2.5f;
|
|
private bool _stopFight = false;
|
|
private bool _stopFight = false;
|
|
|
|
|
|
- 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 GoWrapper _wrapper0;
|
|
|
|
- private GoWrapper _wrapper1;
|
|
|
|
- private GoWrapper _wrapper2;
|
|
|
|
- private GoWrapper _wrapper5;
|
|
|
|
- private GoWrapper _wrapper6;
|
|
|
|
- private GoWrapper _wrapper7;
|
|
|
|
- private GoWrapper _wrapper8;
|
|
|
|
|
|
+ // private GameObject _gameObject0;
|
|
|
|
+ // private GameObject _gameObject1;
|
|
|
|
+ // private GameObject _gameObject2;
|
|
|
|
+
|
|
|
|
+ // private GoWrapper _wrapper0;
|
|
|
|
+ // private GoWrapper _wrapper1;
|
|
|
|
+ // private GoWrapper _wrapper2;
|
|
|
|
+
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
@@ -48,15 +40,10 @@ 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(_gameObject3);
|
|
|
|
- // SceneController.DestroyObjectFromView(_gameObject4);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject6, _wrapper6);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject7, _wrapper7);
|
|
|
|
- SceneController.DestroyObjectFromView(_gameObject8, _wrapper8);
|
|
|
|
|
|
+ // SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
|
|
|
|
+ // SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
|
|
|
|
+ // SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
|
|
|
|
+
|
|
if (_ui != null)
|
|
if (_ui != null)
|
|
{
|
|
{
|
|
_ui.Dispose();
|
|
_ui.Dispose();
|
|
@@ -75,36 +62,28 @@ namespace GFGGame
|
|
_scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFightSingleScore"));
|
|
_scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFightSingleScore"));
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
_ui.m_btnSpeedUp.onClick.Add(OnBtnSpeedUp);
|
|
_ui.m_btnSpeedUp.onClick.Add(OnBtnSpeedUp);
|
|
-
|
|
|
|
- _ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("zd_bj_bja_2");
|
|
|
|
|
|
|
|
- AddEffect();
|
|
|
|
|
|
+ _ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("zd_bj_bja_2");
|
|
|
|
|
|
}
|
|
}
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
- EventAgent.AddEventListener(ConstMessage.CARD_SKILL, CircleScoreStart);
|
|
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.CARD_SKILL, PartScoreStart);
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
- NTexture nTexture = this.viewData as NTexture;
|
|
|
|
//if (_sceneObject == null) _sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
//if (_sceneObject == null) _sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
//SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
|
|
//SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
|
|
- _ui.m_loaRole.texture = nTexture;
|
|
|
|
|
|
+ _ui.m_loaRole.texture = EquipDataCache.cacher.nTexture;
|
|
|
|
+
|
|
_ui.m_loaRole.SetSize(_ui.m_loaRole.width, _ui.m_loaRole.texture.height * _ui.m_loaRole.width / _ui.m_loaRole.texture.width);
|
|
_ui.m_loaRole.SetSize(_ui.m_loaRole.width, _ui.m_loaRole.texture.height * _ui.m_loaRole.width / _ui.m_loaRole.texture.width);
|
|
|
|
|
|
- _gameObject2.SetActive(false);
|
|
|
|
- _ui.m_comClickCircle.target.onClick.Add(CircleScoreEnd);
|
|
|
|
- _ui.m_comAllCircle.target.onTouchBegin.Add(OnComAllCircleClickBegin);
|
|
|
|
- _ui.m_comAllCircle.target.onTouchEnd.Add(AllCircleScoreStart);
|
|
|
|
- _ui.m_comAllCircle.target.visible = false;
|
|
|
|
_ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
|
|
_ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
|
|
_ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
|
|
_ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
|
|
|
|
|
|
_ui.m_comClickCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
|
|
_ui.m_comClickCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
|
|
- _ui.m_comAllCircle.target.touchable = !EquipDataCache.cacher.autoPlay;
|
|
|
|
|
|
|
|
ScoreSystemData.Instance.SetEquipDicWithType();
|
|
ScoreSystemData.Instance.SetEquipDicWithType();
|
|
|
|
|
|
@@ -112,13 +91,13 @@ namespace GFGGame
|
|
StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
|
|
StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
|
|
_ui.m_proScore.target.max = fightCfg.score3;
|
|
_ui.m_proScore.target.max = fightCfg.score3;
|
|
_ui.m_proScore.m_comBar.target.width = 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;
|
|
|
|
|
|
+ _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_txtCount.text = "总分 0";
|
|
_ui.m_proScore.m_txtCount.text = "总分 0";
|
|
|
|
|
|
_stopFight = false;
|
|
_stopFight = false;
|
|
_index = 0;
|
|
_index = 0;
|
|
_score = 0;
|
|
_score = 0;
|
|
- _prefectCount = 0;
|
|
|
|
_mainScore = ScoreSystemData.Instance.GetMainScore();
|
|
_mainScore = ScoreSystemData.Instance.GetMainScore();
|
|
|
|
|
|
if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)//引导中禁止自动战斗
|
|
if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)//引导中禁止自动战斗
|
|
@@ -128,17 +107,16 @@ namespace GFGGame
|
|
}
|
|
}
|
|
Timers.inst.Add(0.5f, 1, (param) =>
|
|
Timers.inst.Add(0.5f, 1, (param) =>
|
|
{
|
|
{
|
|
- SkillScoreStart(null);
|
|
|
|
|
|
+ SkillScore(null);
|
|
});//评分结束
|
|
});//评分结束
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
}
|
|
}
|
|
|
|
|
|
- private void SkillScoreStart(object param)
|
|
|
|
|
|
+ private void SkillScore(object param)
|
|
{
|
|
{
|
|
if (_stopFight) return;
|
|
if (_stopFight) return;
|
|
Debug.Log("_index:" + _index + " length:" + FightScoreCfgArray.Instance.dataArray.Length);
|
|
Debug.Log("_index:" + _index + " length:" + FightScoreCfgArray.Instance.dataArray.Length);
|
|
int partId = FightScoreCfgArray.Instance.dataArray[_index].id;
|
|
int partId = FightScoreCfgArray.Instance.dataArray[_index].id;
|
|
- _ui.m_comClickCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
|
|
|
|
|
|
|
|
_skillScore = 0;//技能附加分
|
|
_skillScore = 0;//技能附加分
|
|
_showCard = false;
|
|
_showCard = false;
|
|
@@ -149,98 +127,63 @@ namespace GFGGame
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- CircleScoreStart();
|
|
|
|
|
|
+ PartScoreStart();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void CircleScoreStart()
|
|
|
|
|
|
+ private void PartScoreStart()
|
|
{
|
|
{
|
|
|
|
+ int partId = FightScoreCfgArray.Instance.dataArray[_index].id;
|
|
|
|
+ _ui.m_comClickCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
|
|
|
|
+ _partScore = ScoreSystemData.Instance.GetPartScore(partId, _mainScore, _skillScore);
|
|
|
|
+ _ui.m_comClickCircle.m_txtScore.text = _partScore.ToString();
|
|
|
|
+ _score += _partScore;
|
|
|
|
+
|
|
Debug.Log("index:" + _index);
|
|
Debug.Log("index:" + _index);
|
|
Vector2 pos = (_ui.target.GetChild("grh_" + _index).asGraph).xy;
|
|
Vector2 pos = (_ui.target.GetChild("grh_" + _index).asGraph).xy;
|
|
float x = 0f;
|
|
float x = 0f;
|
|
float y = 0f;
|
|
float y = 0f;
|
|
-
|
|
|
|
EquipDataCache.cacher.GetCirclePos(pos, _range, out x, out y);
|
|
EquipDataCache.cacher.GetCirclePos(pos, _range, out x, out y);
|
|
_ui.m_comClickCircle.target.SetXY(x, y);
|
|
_ui.m_comClickCircle.target.SetXY(x, y);
|
|
- _ui.m_comClickCircle.target.visible = true;
|
|
|
|
- _ui.m_comClickCircle.target.onClick.Add(CircleScoreEnd);
|
|
|
|
|
|
+ _ui.m_loaGlass.SetXY(x, y);
|
|
|
|
+ _ui.m_loaGlass.url = string.Format("ui://Main/zd_bl_{0}", UnityEngine.Random.Range(0, 3));
|
|
|
|
|
|
- // string resPath6 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_an_sf");
|
|
|
|
if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
|
|
if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
|
|
{
|
|
{
|
|
_ui.m_comClickCircle.target.touchable = false;
|
|
_ui.m_comClickCircle.target.touchable = false;
|
|
- _ui.m_comClickCircle.m_loaCircle.touchable = false;
|
|
|
|
|
|
|
|
- GTween.To(100, _prefectScale, _playTime / 2).SetTarget(_gameObject7).OnUpdate((GTweener t) =>
|
|
|
|
- {
|
|
|
|
- _gameObject7.transform.localScale = new Vector3(t.value.x, t.value.x, t.value.x);
|
|
|
|
- });
|
|
|
|
|
|
+ // GTween.To(100, _prefectScale, _playTime / 2).SetTarget(_gameObject7).OnUpdate((GTweener t) =>
|
|
|
|
+ // {
|
|
|
|
+ // _gameObject7.transform.localScale = new Vector3(t.value.x, t.value.x, t.value.x);
|
|
|
|
+ // });
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
|
|
- _ui.m_comClickCircle.m_grpCircle.visible = true;
|
|
|
|
- _ui.m_comClickCircle.m_c1.selectedIndex = 0;
|
|
|
|
- float scale = EquipDataCache.cacher.autoPlay ? _prefectScale : 0;
|
|
|
|
- float time = (1 - scale / 100f) * _playTime / EquipDataCache.cacher.fightSpeed;
|
|
|
|
- GTween.To(100, scale, time).SetTarget(_gameObject7).OnUpdate((GTweener t) =>
|
|
|
|
- {
|
|
|
|
- if (t.value.x <= _prefectScale && _ui.m_comClickCircle.m_c1.selectedIndex == 0)
|
|
|
|
- {
|
|
|
|
- _ui.m_comClickCircle.m_c1.selectedIndex = 1;
|
|
|
|
- }
|
|
|
|
- _gameObject7.transform.localScale = new Vector3(t.value.x, t.value.x, t.value.x);
|
|
|
|
|
|
|
|
- }).OnComplete(CircleScoreEnd);
|
|
|
|
|
|
+ _ui.m_t1.ignoreEngineTimeScale = false;
|
|
|
|
+ _ui.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;
|
|
|
|
+ _ui.m_t1.SetValue("start", _ui.m_loaGlass.x, _ui.m_loaGlass.y);
|
|
|
|
+ _ui.m_t1.SetValue("end", _ui.m_proScore.m_comBar.m_imgAni.LocalToGlobal(Vector2.zero).x, _ui.m_proScore.target.y);
|
|
|
|
+ _ui.m_t1.Play(UpdateProgress);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- private string[] paths = { "zd_df_sb", "zd_df_lv", "zd_df_cheng" };
|
|
|
|
- private void CircleScoreEnd()
|
|
|
|
- {
|
|
|
|
- _ui.m_comClickCircle.target.onClick.Remove(CircleScoreEnd);
|
|
|
|
- int clickState = GetClickState();
|
|
|
|
- GTweener twener = GTween.GetTween(_gameObject7);
|
|
|
|
- if (twener != null)
|
|
|
|
- {
|
|
|
|
- twener.Kill();
|
|
|
|
- }
|
|
|
|
- // _ui.m_comClickCircle.m_t0.Stop(true, false);
|
|
|
|
- _ui.m_comClickCircle.m_grpCircle.visible = false;
|
|
|
|
- string resPath = ResPathUtil.GetViewEffectPath("ui_zhandou", paths[clickState]);
|
|
|
|
- SceneController.AddObjectToView(_gameObject2, null, _ui.m_comClickCircle.m_ComScoreResult.m_holder, resPath, out _gameObject2, out _wrapper2, 59);
|
|
|
|
- _gameObject2.SetActive(true);
|
|
|
|
-
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.m_c1.selectedIndex = clickState;
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.target.visible = true;
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.m_t0.ignoreEngineTimeScale = false;
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.m_t0.Play(() =>
|
|
|
|
- {
|
|
|
|
- _gameObject2.SetActive(false);
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.target.visible = false;
|
|
|
|
- PlayScoreTWEffect();
|
|
|
|
- CircleResuleEnd();
|
|
|
|
|
|
|
|
- });
|
|
|
|
- UpdateCircleResult(clickState);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- private void UpdateCircleResult(int clickState)
|
|
|
|
|
|
+ private void UpdateProgress()
|
|
{
|
|
{
|
|
- //只显示部件分加基础分
|
|
|
|
- UI_ComScoreResult comScoreResult = UI_ComScoreResult.Proxy(_ui.m_comClickCircle.m_ComScoreResult.target);
|
|
|
|
- int partId = FightScoreCfgArray.Instance.dataArray[_index].id;
|
|
|
|
- double partScore = ScoreSystemData.Instance.GetPartItemScore(partId);
|
|
|
|
- double clickScore = +ScoreSystemData.Instance.GetPartItemClickScore(partId, clickState);
|
|
|
|
- int count = (int)(partScore + clickScore);
|
|
|
|
-
|
|
|
|
- comScoreResult.m_txtCount0.text = count.ToString();
|
|
|
|
- comScoreResult.m_txtCount1.text = count.ToString();
|
|
|
|
- comScoreResult.m_txtCount2.text = count.ToString();
|
|
|
|
- ET.Log.Debug("count:" + count);
|
|
|
|
- _score += ScoreSystemData.Instance.GetPartScore(partId, clickState, _mainScore, _skillScore);
|
|
|
|
- UI_ComScoreResult.ProxyEnd();
|
|
|
|
|
|
+ double proportion = _score / _ui.m_proScore.target.max;
|
|
|
|
+ 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;
|
|
|
|
+ }).OnComplete(() =>
|
|
|
|
+ {
|
|
|
|
+ EquipDataCache.cacher.totalScore = _score;
|
|
|
|
+ _ui.m_proScore.m_txtCount.text = string.Format("总分 {0}", _score);
|
|
|
|
+ CircleResuleEnd();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
private void CircleResuleEnd()
|
|
private void CircleResuleEnd()
|
|
@@ -248,95 +191,17 @@ namespace GFGGame
|
|
_index++;
|
|
_index++;
|
|
if (_index >= FightScoreCfgArray.Instance.dataArray.Length)
|
|
if (_index >= FightScoreCfgArray.Instance.dataArray.Length)
|
|
{
|
|
{
|
|
- if (_prefectCount == FightScoreCfgArray.Instance.dataArray.Length)
|
|
|
|
- {
|
|
|
|
- AllCirclePlayStart();//完美八连击
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- Timers.inst.Add(0.5f, 1, Skip);//评分结束
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
- _ui.m_comClickCircle.m_loaCircle.onClick.Add(CircleScoreEnd);
|
|
|
|
- Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / EquipDataCache.cacher.fightSpeed, 1, SkillScoreStart);//下个部分评分
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private void AllCirclePlayStart()
|
|
|
|
- {
|
|
|
|
- //登峰造极评分开始
|
|
|
|
- _ui.m_comAllCircle.target.visible = true;
|
|
|
|
- _ui.m_comAllCircle.m_t0.ignoreEngineTimeScale = false;
|
|
|
|
- _ui.m_comAllCircle.m_t0.timeScale = EquipDataCache.cacher.fightSpeed;// 1 / _speed;
|
|
|
|
- _ui.m_comAllCircle.m_t0.Play(() =>
|
|
|
|
- {
|
|
|
|
- AllCircleScoreStart();
|
|
|
|
- _ui.m_comAllCircle.m_t1.Play(() =>
|
|
|
|
- {
|
|
|
|
- PlayScoreTWEffect();
|
|
|
|
- Timers.inst.Add(1f, 1, Skip);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- private void OnComAllCircleClickBegin()
|
|
|
|
- {
|
|
|
|
- if (_ui.m_comAllCircle.m_imgCircle.visible == false)
|
|
|
|
- {
|
|
|
|
- Timers.inst.Remove(ComAllCirclePressTime);
|
|
|
|
|
|
+ Timers.inst.Add(0.5f, 1, Skip);//评分结束
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- Timers.inst.Add(0.1f, 0, ComAllCirclePressTime);
|
|
|
|
|
|
+ Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / EquipDataCache.cacher.fightSpeed, 1, SkillScore);//下个部分评分
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- private void ComAllCirclePressTime(object param = null)
|
|
|
|
- {
|
|
|
|
- //登峰造极长按时间
|
|
|
|
- _time += 0.1f;
|
|
|
|
- }
|
|
|
|
- private void AllCircleScoreStart()
|
|
|
|
- {
|
|
|
|
- Timers.inst.Remove(ComAllCirclePressTime);
|
|
|
|
- _ui.m_comAllCircle.m_t0.Stop();
|
|
|
|
- _ui.m_comAllCircle.target.onTouchBegin.Remove(OnComAllCircleClickBegin);
|
|
|
|
- _ui.m_comAllCircle.target.onTouchEnd.Remove(AllCircleScoreStart);
|
|
|
|
-
|
|
|
|
- double allCircleScore = 0;
|
|
|
|
- if (_time >= ConstScoreSystem.LONG_PRESS_TIME)
|
|
|
|
- {
|
|
|
|
- allCircleScore = ScoreSystemData.Instance.GetAllCircleAddScore(_mainScore);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- Timers.inst.Add(1f, 1, Skip);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- _ui.m_comAllCircle.m_txtCount.text = ((int)Math.Round(allCircleScore)).ToString();
|
|
|
|
|
|
|
|
- _time = 0;
|
|
|
|
- _score += allCircleScore;
|
|
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private void SetScoreUI()
|
|
|
|
- {
|
|
|
|
- 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);
|
|
|
|
-
|
|
|
|
- double proportion = _score / _ui.m_proScore.target.max;
|
|
|
|
- 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()
|
|
private void OnBtnSpeedUp()
|
|
{
|
|
{
|
|
EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
|
|
EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
|
|
@@ -358,61 +223,25 @@ namespace GFGGame
|
|
protected override void RemoveEventListener()
|
|
protected override void RemoveEventListener()
|
|
{
|
|
{
|
|
base.RemoveEventListener();
|
|
base.RemoveEventListener();
|
|
- EventAgent.RemoveEventListener(ConstMessage.CARD_SKILL, CircleScoreStart);
|
|
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.CARD_SKILL, PartScoreStart);
|
|
}
|
|
}
|
|
private void Reset()
|
|
private void Reset()
|
|
{
|
|
{
|
|
- _stopFight = true;
|
|
|
|
- Timers.inst.Remove(SkillScoreStart);
|
|
|
|
|
|
+ // _stopFight = true;
|
|
|
|
+ Timers.inst.Remove(SkillScore);
|
|
Timers.inst.Remove(Skip);
|
|
Timers.inst.Remove(Skip);
|
|
- _ui.m_comAllCircle.target.visible = false;
|
|
|
|
- _ui.m_comClickCircle.target.visible = false;
|
|
|
|
- // _ui.m_comClickCircle.m_t0.Stop(true, false);
|
|
|
|
- // _ui.m_comClickCircle.m_t1.Stop(true, false);
|
|
|
|
|
|
+
|
|
_ui.m_proScore.target.value = 0;
|
|
_ui.m_proScore.target.value = 0;
|
|
- // _ui.m_proScore.m_txtCount.text = "总分 0";
|
|
|
|
- _gameObject2.SetActive(false);
|
|
|
|
- // _ui.m_comClickCircle.m_ComScoreResult;// ComScoreResult
|
|
|
|
- _ui.m_comClickCircle.m_ComScoreResult.target.visible = false;
|
|
|
|
- GTween.Kill(_gameObject7);
|
|
|
|
- GTween.Kill(_ui.m_proScore.m_comBar);
|
|
|
|
- GTween.Kill(_ui.m_holderPartScore);
|
|
|
|
- }
|
|
|
|
|
|
+ _ui.m_proScore.m_txtCount.text = "总分 0";
|
|
|
|
+ _ui.m_comClickCircle.target.SetScale(0, 0);
|
|
|
|
+ _ui.m_loaGlass.SetScale(0, 0);
|
|
|
|
+
|
|
|
|
+ // GTween.Kill(_ui.m_proScore.m_comBar);
|
|
|
|
|
|
- private void PlayScoreTWEffect()
|
|
|
|
- {
|
|
|
|
- _ui.m_holderPartScore.visible = true;
|
|
|
|
- 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;
|
|
|
|
- }).OnComplete(() =>
|
|
|
|
- {
|
|
|
|
- _ui.m_holderPartScore.visible = false;
|
|
|
|
- SetScoreUI();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- private void AddEffect()
|
|
|
|
- {
|
|
|
|
- string resPath0 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_tw");
|
|
|
|
- SceneController.AddObjectToView(_gameObject0, null, _ui.m_holderPartScore, resPath0, out _gameObject0, out _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 _wrapper1);
|
|
|
|
- string resPath2 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_cheng");
|
|
|
|
- SceneController.AddObjectToView(_gameObject2, null, _ui.m_comClickCircle.m_ComScoreResult.m_holder1, resPath2, out _gameObject2, out _wrapper2, 59);
|
|
|
|
- // string resPath3_1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_lv");
|
|
|
|
- // SceneController.AddObjectToView(_gameObject3, null, _ui.m_comClickCircle.m_ComScoreResult.m_holder, resPath3_1, out _gameObject3, out GoWrapper _wrapper3, 59);
|
|
|
|
- // string resPath3_2 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_sb");
|
|
|
|
- // SceneController.AddObjectToView(_gameObject4, null, _ui.m_comClickCircle.m_ComScoreResult.m_holder2, resPath3_2, out _gameObject4, out GoWrapper _wrapper4, 59);
|
|
|
|
- string resPath4 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_cz");
|
|
|
|
- SceneController.AddObjectToView(_gameObject5, null, _ui.m_proScore.m_comBar.m_holder1, resPath4, out _gameObject5, out _wrapper5);
|
|
|
|
- string resPath5 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_an_cz");
|
|
|
|
- SceneController.AddObjectToView(_gameObject6, _wrapper6, _ui.m_comClickCircle.m_holder, resPath5, out _gameObject6, out _wrapper6);
|
|
|
|
- string resPath6 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_an_sf");
|
|
|
|
- SceneController.AddObjectToView(_gameObject7, _wrapper7, _ui.m_comClickCircle.m_holder1, resPath6, out _gameObject7, out _wrapper7);
|
|
|
|
- string resPath7 = ResPathUtil.GetViewEffectPath("ui_zhandou", "zd_df_dfzj");
|
|
|
|
- SceneController.AddObjectToView(_gameObject8, null, _ui.m_comAllCircle.m_holder, resPath7, out _gameObject8, out _wrapper8, 70);
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
{
|
|
{
|
|
base.OnHide();
|
|
base.OnHide();
|
|
@@ -428,31 +257,6 @@ namespace GFGGame
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- //********************************************************************************************************//
|
|
|
|
-
|
|
|
|
- private int GetClickState()
|
|
|
|
- {
|
|
|
|
- float scaleX = _gameObject7.transform.localScale.x;// _ui.m_comClickCircle.m_imgCircle.scaleX;
|
|
|
|
- int clickState = ScoreSystemData.MISS_CLICK;
|
|
|
|
- if (EquipDataCache.cacher.autoPlay == true)
|
|
|
|
- {
|
|
|
|
- return ScoreSystemData.PREFACT_CLICK;
|
|
|
|
- }
|
|
|
|
- if (scaleX <= _prefectScale && scaleX > 40f)
|
|
|
|
- {
|
|
|
|
- clickState = ScoreSystemData.PREFACT_CLICK;
|
|
|
|
- _prefectCount++;
|
|
|
|
- }
|
|
|
|
- else if (scaleX <= 20f)
|
|
|
|
- {
|
|
|
|
- clickState = ScoreSystemData.MISS_CLICK;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- clickState = ScoreSystemData.GREAT_CLICK;
|
|
|
|
- }
|
|
|
|
- return clickState;
|
|
|
|
- }
|
|
|
|
private void CheckGuide(object param)
|
|
private void CheckGuide(object param)
|
|
{
|
|
{
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
|
|
@@ -470,7 +274,7 @@ namespace GFGGame
|
|
|
|
|
|
if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
|
|
|
|
- float scaleX = _gameObject7.transform.localScale.x;
|
|
|
|
|
|
+ float scaleX = 0;// _gameObject7.transform.localScale.x;
|
|
if (scaleX == _prefectScale)
|
|
if (scaleX == _prefectScale)
|
|
{
|
|
{
|
|
bool isGuide = GuideController.TryGuide(_ui.m_comClickCircle.target, ConstGuideId.SINGLE_FIGHT, 9, "服饰比较繁琐,适当的整理会更加分,点击为各部位修整吧。");
|
|
bool isGuide = GuideController.TryGuide(_ui.m_comClickCircle.target, ConstGuideId.SINGLE_FIGHT, 9, "服饰比较繁琐,适当的整理会更加分,点击为各部位修整吧。");
|