From eda22bcd9683f3a94e0744da60d23808272c627f Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 13 八月 2018 17:28:00 +0800
Subject: [PATCH] 1528 冰晶矿脉里面角色死亡复活后怪物血条位置显示异常
---
System/MainInterfacePanel/PowerAddWin.cs | 312 ++++++++++++++++++++++++++--------------------------
1 files changed, 156 insertions(+), 156 deletions(-)
diff --git a/System/MainInterfacePanel/PowerAddWin.cs b/System/MainInterfacePanel/PowerAddWin.cs
index 8d2ac2c..306f8d3 100644
--- a/System/MainInterfacePanel/PowerAddWin.cs
+++ b/System/MainInterfacePanel/PowerAddWin.cs
@@ -1,156 +1,156 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Monday, November 27, 2017
-//--------------------------------------------------------
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using UnityEngine;
-using UnityEngine.UI;
-//鎴樻枟鍔涘鍔�
-namespace Snxxz.UI {
-
- public class PowerAddWin : Window
- {
- [SerializeField] Text m_PowerText;//鐢ㄦ潵鑾峰彇鎴樻枟鍔�
- private int prowNum = 0;
- #region Built-in
- private int Length = 0;//鎵�闇�闀垮害
- private int Finalvalue = 0;//鏈�缁堝��
- int Default = 0;
- int Value = -1;
- private float lastTime = 0;
- [Header("鍋滅暀閫熷害")]
- public float StaySpeed = 1.5f;
- [Header("婊氬姩閫熷害")]
- public double RollingSpeed = 0.1f;
- private float lastTime1 = 0;
-
- [SerializeField] RectTransform m_ContainerDisplay;
- [SerializeField] List<PowerUpPosition> powerUpPositions;
-
- PlayerMainDate m_MainModel;
- PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
- protected override void BindController()
- {
- }
-
- protected override void AddListeners()
- {
-
- }
-
-
- protected override void OnPreOpen()
- {
- lastTime = 0;
- lastTime1 = 0;
- Length = onMainModel.ProwNumAdd.ToString().Length;
- Finalvalue = onMainModel.ProwNumAdd;
- BFairyAuRewards(Finalvalue);
- CheckPosition();
- }
-
- protected override void OnAfterOpen()
- {
-
- }
-
- protected override void OnPreClose()
- {
- }
-
- protected override void OnAfterClose()
- {
- }
-
- StringBuilder theTarget = new StringBuilder();//鐩爣鍊�
- StringBuilder variation = new StringBuilder();//鍙樺寲鍊�
- void BFairyAuRewards(int Number)
- {
- Finalvalue = Number;
- Value = Length - 1;
- Default = 0;
- int length = 0;
- length = Finalvalue.ToString().Length;
- theTarget.Length = 0;
- theTarget.Append('0', Length - length);
- theTarget.Append(Finalvalue);
- theTarget.ToString();
- variation.Length = 0;
- variation.Append('0', Length);
-
- }
-
- protected override void LateUpdate()
- {
-
- if (Value < 0)
- {
- lastTime += Time.deltaTime;
- if (lastTime >= StaySpeed)
- {
- Close();
- }
-
- return;
- }
- lastTime1 += Time.deltaTime;
- if (lastTime1>= RollingSpeed)
- {
- if (theTarget[Value] != variation[Value])
- {
- Default += (int)Mathf.Pow(10, Length - 1 - Value);
- variation.Length = 0;
- int length = Default.ToString().Length;
- variation.Append('0', Length - length);
- variation.Append(Default);
- variation.ToString();
- m_PowerText.text = "+" + variation.ToString();
- }
- else Value--;
- lastTime1 = 0;
- }
-
- }
-
- #endregion
-
- void CheckPosition()
- {
- var type = WindowType.None;
- if (WindowCenter.Instance.CheckOpen<TreasureLevelUpWin>())
- {
- type = WindowType.TreasureLevelUp;
- }
- var _index = powerUpPositions.FindIndex((x)=>
- {
- return x.windowType == type;
- });
- if (_index != -1)
- {
- m_ContainerDisplay.transform.localPosition = powerUpPositions[_index].position;
- }
- }
-
- [Serializable]
- public struct PowerUpPosition
- {
- public WindowType windowType;
- public Vector3 position;
- }
-
- public enum WindowType
- {
- None,
- TreasureLevelUp,
- }
- }
-
-}
-
-
-
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, November 27, 2017
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine;
+using UnityEngine.UI;
+//鎴樻枟鍔涘鍔�
+namespace Snxxz.UI {
+
+ public class PowerAddWin : Window
+ {
+ [SerializeField] Text m_PowerText;//鐢ㄦ潵鑾峰彇鎴樻枟鍔�
+ private int prowNum = 0;
+ #region Built-in
+ private int Length = 0;//鎵�闇�闀垮害
+ private int Finalvalue = 0;//鏈�缁堝��
+ int Default = 0;
+ int Value = -1;
+ private float lastTime = 0;
+ [Header("鍋滅暀閫熷害")]
+ public float StaySpeed = 1.5f;
+ [Header("婊氬姩閫熷害")]
+ public double RollingSpeed = 0.1f;
+ private float lastTime1 = 0;
+
+ [SerializeField] RectTransform m_ContainerDisplay;
+ [SerializeField] List<PowerUpPosition> powerUpPositions;
+
+ PlayerMainDate m_MainModel;
+ PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ lastTime = 0;
+ lastTime1 = 0;
+ Length = onMainModel.ProwNumAdd.ToString().Length;
+ Finalvalue = onMainModel.ProwNumAdd;
+ BFairyAuRewards(Finalvalue);
+ CheckPosition();
+ }
+
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+
+ StringBuilder theTarget = new StringBuilder();//鐩爣鍊�
+ StringBuilder variation = new StringBuilder();//鍙樺寲鍊�
+ void BFairyAuRewards(int Number)
+ {
+ Finalvalue = Number;
+ Value = Length - 1;
+ Default = 0;
+ int length = 0;
+ length = Finalvalue.ToString().Length;
+ theTarget.Length = 0;
+ theTarget.Append('0', Length - length);
+ theTarget.Append(Finalvalue);
+ theTarget.ToString();
+ variation.Length = 0;
+ variation.Append('0', Length);
+
+ }
+
+ protected override void LateUpdate()
+ {
+
+ if (Value < 0)
+ {
+ lastTime += Time.deltaTime;
+ if (lastTime >= StaySpeed)
+ {
+ Close();
+ }
+
+ return;
+ }
+ lastTime1 += Time.deltaTime;
+ if (lastTime1>= RollingSpeed)
+ {
+ if (theTarget[Value] != variation[Value])
+ {
+ Default += (int)Mathf.Pow(10, Length - 1 - Value);
+ variation.Length = 0;
+ int length = Default.ToString().Length;
+ variation.Append('0', Length - length);
+ variation.Append(Default);
+ variation.ToString();
+ m_PowerText.text = "+" + variation.ToString();
+ }
+ else Value--;
+ lastTime1 = 0;
+ }
+
+ }
+
+ #endregion
+
+ void CheckPosition()
+ {
+ var type = WindowType.None;
+ if (WindowCenter.Instance.CheckOpen<TreasureLevelUpWin>())
+ {
+ type = WindowType.TreasureLevelUp;
+ }
+ var _index = powerUpPositions.FindIndex((x)=>
+ {
+ return x.windowType == type;
+ });
+ if (_index != -1)
+ {
+ m_ContainerDisplay.transform.localPosition = powerUpPositions[_index].position;
+ }
+ }
+
+ [Serializable]
+ public struct PowerUpPosition
+ {
+ public WindowType windowType;
+ public Vector3 position;
+ }
+
+ public enum WindowType
+ {
+ None,
+ TreasureLevelUp,
+ }
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0