From 243044702c6a743e57d322e5ca538d9897919026 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 11 十二月 2025 10:25:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Component/UI/Common/GroupButtonEx.cs | 6
Main/System/Launch/LoadingWin.cs | 8
Main/Manager/StageManager.cs | 7
Main/ResModule/BuiltInLoader.cs | 2
Main/Core/GameEngine/Launch/InitSettingTask.cs | 3
Main/System/Sound/SoundPlayer.cs | 16
Main/Common/EventName.cs | 2
Main/System/Battle/BattleField/BattleField.cs | 2
Main/System/UIBase/OneLevelWin.cs | 3
Main/System/MainLevel/MainLevelDropCell.cs | 11
Main/Core/GameEngine/Launch/RequestPermissionStart.cs | 37 +-
Main/System/Launch/LaunchWin.cs | 499 ++++++++++++++++++++++-----------------------
Main/System/Main/MainWin.cs | 19 +
Main/SDK/SDKUtils.cs | 1
14 files changed, 322 insertions(+), 294 deletions(-)
diff --git a/Main/Common/EventName.cs b/Main/Common/EventName.cs
index 6c9ab2d..f6a6170 100644
--- a/Main/Common/EventName.cs
+++ b/Main/Common/EventName.cs
@@ -13,7 +13,7 @@
public const string BATTLE_DROP_ITEMS = "BATTLE_DROP_ITEMS";//鎺夎惤鐗╁搧
public const string BATTLE_CAST_SKILL = "BATTLE_CAST_SKILL";//鏂芥斁鎶�鑳�
-
+ public const string BATTLE_START = "BATTLE_START";//鎴樻枟鍒濆鍖�
public const string BATTLE_END = "BATTLE_END";//鎴樻枟缁撴潫
public const string RECORDPLAYER_END = "RECORDPLAYER_END"; //鎴樻枟灏忕墖娈电粨鏉�
diff --git a/Main/Component/UI/Common/GroupButtonEx.cs b/Main/Component/UI/Common/GroupButtonEx.cs
index 4585c02..f977fb1 100644
--- a/Main/Component/UI/Common/GroupButtonEx.cs
+++ b/Main/Component/UI/Common/GroupButtonEx.cs
@@ -71,8 +71,8 @@
set { this.m_Title = value; }
}
- [SerializeField] TextEx m_TitleOutline;
- public TextEx titleOutline
+ [SerializeField] OutlineEx m_TitleOutline;
+ public OutlineEx titleOutline
{
get { return this.m_TitleOutline; }
set { this.m_TitleOutline = value; }
@@ -157,7 +157,7 @@
if (m_TitleOutline != null && m_Manager != null)
{
- m_TitleOutline.color = m_Manager.GetOutlineColorForState(m_State);
+ m_TitleOutline.OutlineColor = m_Manager.GetOutlineColorForState(m_State);
}
if (m_SelectEffect != null)
diff --git a/Main/Core/GameEngine/Launch/InitSettingTask.cs b/Main/Core/GameEngine/Launch/InitSettingTask.cs
index c4b65ed..87f63a6 100644
--- a/Main/Core/GameEngine/Launch/InitSettingTask.cs
+++ b/Main/Core/GameEngine/Launch/InitSettingTask.cs
@@ -15,7 +15,8 @@
ShaderUtility.InitGlobalParams();
// SoundPlayer.CreateSoundPlayer();
SoundPlayer.Instance.Init();
- //SoundPlayer.Instance.PlayLoginMusic();
+ SoundPlayer.Instance.PlayLoginMusic();
+ // SoundPlayer.Instance.PlayBackGroundMusic(41);
SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume());
SystemSetting.Instance.SetSoundEffect(SystemSetting.Instance.GetSoundEffect());
diff --git a/Main/Core/GameEngine/Launch/RequestPermissionStart.cs b/Main/Core/GameEngine/Launch/RequestPermissionStart.cs
index 97385e1..a3927d2 100644
--- a/Main/Core/GameEngine/Launch/RequestPermissionStart.cs
+++ b/Main/Core/GameEngine/Launch/RequestPermissionStart.cs
@@ -5,24 +5,29 @@
public override void Begin()
{
-#if UNITY_EDITOR
- done = true;
- LocalSave.SetBool("secretToggleStart5", true);
-#endif
+// #if UNITY_EDITOR
+// done = true;
+// LocalSave.SetBool("secretToggleStart5", true);
+// #endif
- if (LocalSave.GetBool("secretToggleStart5"))
- {
- SDKUtils.Instance.IsAgreeSecret = true;
- SDKUtils.Instance.RequestAndroidPermissionStart();
- }
- else
- {
- //鍏堝脊闅愮鏀跨瓥锛屽悓鎰忎箣鍚庢墠鍙互鐢宠鏉冮檺 缁х画娓告垙
- // UIManager.Instance.OpenWindow<RequestSecretWin>();
+ // if (LocalSave.GetBool("secretToggleStart5"))
+ // {
+ // SDKUtils.Instance.IsAgreeSecret = true;
+ // SDKUtils.Instance.RequestAndroidPermissionStart();
+ // }
+ // else
+ // {
+ // //鍏堝脊闅愮鏀跨瓥锛屽悓鎰忎箣鍚庢墠鍙互鐢宠鏉冮檺 缁х画娓告垙
+ // // UIManager.Instance.OpenWindow<RequestSecretWin>();
- //鏀规垚鍚慡DK璇锋眰闅愮鏉冮檺
- SDKUtils.Instance.RequestSecretRule();
- }
+ // //鏀规垚鍚慡DK璇锋眰闅愮鏉冮檺
+ // SDKUtils.Instance.RequestSecretRule();
+ // }
+
+ //鍒拌繖閲屼竴瀹氭槸鍚屾剰闅愮锛岀函瀹夊崜澶勭悊
+ LocalSave.SetBool("PrivacyAcceptedKey", true);
+ SDKUtils.Instance.RequestAndroidPermissionStart();
+ SDKUtils.Instance.IsAgreeSecret = true;
}
public override void End()
diff --git a/Main/Manager/StageManager.cs b/Main/Manager/StageManager.cs
index eac6278..5d1fcad 100644
--- a/Main/Manager/StageManager.cs
+++ b/Main/Manager/StageManager.cs
@@ -51,7 +51,7 @@
UIManager.Instance.OpenWindow<LaunchBackGroundWin>();
UIManager.Instance.OpenWindow<LoginWin>();
- SoundPlayer.Instance.StopBackGroundMusic();
+ // SoundPlayer.Instance.StopBackGroundMusic();
if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset)
{
@@ -78,7 +78,8 @@
{
UIManager.Instance.OpenWindow<ServerForceExitHintWin>();
}
- SoundPlayer.Instance.StopBackGroundMusic();
+ // SoundPlayer.Instance.StopBackGroundMusic();
+ SoundPlayer.Instance.PlayLoginMusic();
}
protected float GetManagerRequestDataProgress()
@@ -114,7 +115,7 @@
{
AssetBundleUtility.Instance.Sync_LoadAll("maps/Game");
}
-
+ SoundPlayer.Instance.StopBackGroundMusic();
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync("Game");
await OnLoading(asyncOperation, () => (DTC0403_tagPlayerLoginLoadOK.finishedLogin ? .5f : 0f) + GetManagerRequestDataProgress() * .5f);
diff --git a/Main/ResModule/BuiltInLoader.cs b/Main/ResModule/BuiltInLoader.cs
index f39c7c1..9b8c8f3 100644
--- a/Main/ResModule/BuiltInLoader.cs
+++ b/Main/ResModule/BuiltInLoader.cs
@@ -88,7 +88,7 @@
if (!AssetSource.isUseAssetBundle)
{
#if UNITY_EDITOR
- var path = StringUtility.Concat("Assets/ResourcesOut/BuiltIn/Musics/", name, AUDIO_EXTENSION);
+ var path = StringUtility.Concat("Assets/ResourcesOut/BuiltIn/Musics/", name, ".mp3");
audioClip = UnityEditor.AssetDatabase.LoadAssetAtPath<AudioClip>(path);
#endif
}
diff --git a/Main/SDK/SDKUtils.cs b/Main/SDK/SDKUtils.cs
index ad07492..c265c77 100644
--- a/Main/SDK/SDKUtils.cs
+++ b/Main/SDK/SDKUtils.cs
@@ -520,6 +520,7 @@
}
case CodeA2U.SecretRuleOK:
{
+ // 绾痑ndroid澶勭悊锛岃繖閲岃Е鍙戜笉鍒颁簡
IsAgreeSecret = true;
LocalSave.SetBool("secretToggleStart5", true);
break;
diff --git a/Main/System/Battle/BattleField/BattleField.cs b/Main/System/Battle/BattleField/BattleField.cs
index e69f6da..e933973 100644
--- a/Main/System/Battle/BattleField/BattleField.cs
+++ b/Main/System/Battle/BattleField/BattleField.cs
@@ -185,6 +185,8 @@
battleHpRecorder.Add(guid, battleHpRecord);
}
#endif
+
+ EventBroadcast.Instance.Broadcast<string>(EventName.BATTLE_START, guid);
}
private void PreloadResources(List<TeamBase> redTeamList, List<TeamBase> blueTeamList)
diff --git a/Main/System/Launch/LaunchWin.cs b/Main/System/Launch/LaunchWin.cs
index 0476ddb..5eceb48 100644
--- a/Main/System/Launch/LaunchWin.cs
+++ b/Main/System/Launch/LaunchWin.cs
@@ -11,285 +11,274 @@
- public class LaunchWin : UIBase
+public class LaunchWin : UIBase
+{
+ // [SerializeField] UIAlphaTween m_AlphaTween;
+ // [SerializeField] Image m_BackGround;
+ [SerializeField] RectTransform m_AndroidProgressContainer;
+ [SerializeField] RectTransform m_NetworkContainer;
+ // [SerializeField] SmoothSlider m_PartProgressSlider;
+ [SerializeField] Slider m_TotalProgressSlider;
+ [SerializeField] Text m_StageDescription;
+ [SerializeField] RectTransform m_IosProgressContainer;
+ [SerializeField] Text m_IosProgressTip;
+ [SerializeField] Text m_BuildTime;
+ [SerializeField] Text m_Version;
+
+ bool assetBuildTimeShowed = false;
+
+ LaunchStage showStage = LaunchStage.None;
+ int showStep = 0;
+ string stepDescription = string.Empty;
+
+ float backGroundTimer = 0f;
+ int backGroundIndex = 0;
+ List<Sprite> backGrounds = new List<Sprite>();
+
+ int AllTimes = 0;
+ int WaitSeconds = 0;
+ bool ShowCircleView = false;
+ float TempCheck = 0;
+
+
+ protected override void OnPreOpen()
{
- // [SerializeField] UIAlphaTween m_AlphaTween;
- // [SerializeField] Image m_BackGround;
- [SerializeField] RectTransform m_AndroidProgressContainer;
- [SerializeField] RectTransform m_NetworkContainer;
- [SerializeField] SmoothSlider m_PartProgressSlider;
- [SerializeField] SmoothSlider m_TotalProgressSlider;
- [SerializeField] Text m_StageDescription;
- [SerializeField] RectTransform m_IosProgressContainer;
- [SerializeField] Text m_IosProgressTip;
- [SerializeField] Text m_BuildTime;
- [SerializeField] Text m_Version;
-
- bool assetBuildTimeShowed = false;
-
- LaunchStage showStage = LaunchStage.None;
- int showStep = 0;
- string stepDescription = string.Empty;
-
- float backGroundTimer = 0f;
- int backGroundIndex = 0;
- List<Sprite> backGrounds = new List<Sprite>();
-
- int AllTimes = 0;
- int WaitSeconds = 0;
- bool ShowCircleView = false;
- float TempCheck = 0;
- protected override void InitComponent()
+ base.OnPreOpen();
+ UIManager.Instance.OnOpenWindow += OnOpenWindow;
+ UIManager.Instance.OnCloseWindow += OnCloseWindow;
+ backGroundTimer = 0f;
+ backGroundIndex = 0;
+ if (m_TotalProgressSlider != null)
{
- base.InitComponent();
- // m_BackGround.preserveAspect = true;
- // if (Application.isEditor)
- // {
- // var sprite = BuiltInLoader.LoadSprite("Launch_1");
- // m_BackGround.overrideSprite = sprite;
- // }
- // else
- // {
- // for (var i = 0; i < 3; i++)
- // {
- // var sprite = BuiltInLoader.LoadSprite(StringUtility.Concat("Launch_", i + 1));
- // if (sprite != null)
- // {
- // backGrounds.Add(sprite);
- // }
- // }
-
- // m_BackGround.overrideSprite = backGrounds[0];
- // }
-
-
+ m_TotalProgressSlider.value = 0f;
}
- protected override void OnPreOpen()
+ // m_AlphaTween.SetStartState();
+
+ m_BuildTime.text = VersionConfig.Get().debugVersion ? VersionConfig.Get().buildTime : "";
+
+ if (m_NetworkContainer != null)
{
- base.OnPreOpen();
- backGroundTimer = 0f;
- backGroundIndex = 0;
- if (m_TotalProgressSlider != null)
+ m_NetworkContainer.SetActive(false);
+ }
+
+ var AppleCheck = InitialFunctionConfig.Get("CheckTime").Numerical1;
+ var AndroidCheck = InitialFunctionConfig.Get("CheckTime").Numerical2;
+ var CheckAll = InitialFunctionConfig.Get("NetworkCheck").Numerical1;
+ AllTimes = int.Parse(CheckAll);
+ var CheckTime = InitialFunctionConfig.Get("NetworkCheck").Numerical2;
+ WaitSeconds = int.Parse(CheckTime);
+ ShowCircleView = false;
+ if (Application.platform == RuntimePlatform.IPhonePlayer && AppleCheck == "1")
+ ShowCircleView = true;
+ if (Application.platform == RuntimePlatform.Android && AndroidCheck == "1")
+ ShowCircleView = true;
+
+ if (ShowCircleView)
+ {
+ m_AndroidProgressContainer.SetActive(false);
+ m_IosProgressContainer.SetActive(true);
+ m_Version.text = string.Empty;
+ }
+ else
+ {
+ m_AndroidProgressContainer.SetActive(true);
+ m_IosProgressContainer.SetActive(false);
+ //鎵撳寘鐗堟湰 + 鍔熻兘鐗堟湰 + 璇█ID
+ m_Version.text = LoginManager.Instance.GetVersionStr();
+ }
+
+ if (m_StageDescription != null)
+ {
+ m_StageDescription.text = GetLaunchStageDescription(showStage, showStep);
+ }
+
+ UpdateProgress();
+
+ // if (m_TotalProgressSlider == null)
+ // {
+ // m_TotalProgressSlider = this.GetComponentInChildren<SmoothSlider>(true);
+ // }
+ }
+
+
+
+ protected override void OnPreClose()
+ {
+ base.OnPreClose();
+ UIManager.Instance.OnOpenWindow -= OnOpenWindow;
+ UIManager.Instance.OnCloseWindow -= OnCloseWindow;
+ }
+
+ void OnOpenWindow(UIBase win)
+ {
+ if (win is DownLoadWin)
+ {
+ m_AndroidProgressContainer.SetActive(false);
+ }
+ }
+
+ void OnCloseWindow(UIBase win)
+ {
+ if (win is DownLoadWin)
+ {
+ m_AndroidProgressContainer.SetActive(true);
+ }
+ }
+
+
+ public void FadeOut()
+ {
+ // m_AlphaTween.Play();
+ CloseWindow();
+ }
+
+ string GetLaunchStageDescription(LaunchStage _stage, int step)
+ {
+ switch (_stage)
+ {
+ case LaunchStage.SDKInit:
+ return Language.GetFromLocal(36);
+ case LaunchStage.AssetCopy:
+ return StringUtility.Concat(Language.GetFromLocal(37), "(", step.ToString(), ")");
+ case LaunchStage.AssetDecompress:
+ return StringUtility.Concat(Language.GetFromLocal(38), "(", step.ToString(), ")");
+ case LaunchStage.ClientVersion:
+ return Language.GetFromLocal(39);
+ case LaunchStage.CheckAsset:
+ return Language.GetFromLocal(40);
+ case LaunchStage.DownLoad:
+ return Language.GetFromLocal(41);
+ case LaunchStage.AssetBundleInit:
+ return Language.GetFromLocal(42);
+ case LaunchStage.ConfigInit:
+ return StringUtility.Concat(Language.GetFromLocal(43), "(", step.ToString(), ")");
+ case LaunchStage.Complete:
+ return Language.GetFromLocal(44);
+ default:
+ return "";
+ }
+ }
+
+ protected void LateUpdate()
+ {
+ UpdateProgress();
+
+ // backGroundTimer += Time.deltaTime;
+ // if (backGroundTimer >= 3f)
+ // {
+ // backGroundTimer = 0f;
+ // if (backGrounds.Count > 1)
+ // {
+ // m_BackGround.overrideSprite = backGrounds[(++backGroundIndex) % backGrounds.Count];
+ // }
+ // }
+
+ if (HttpBehaviour.ConnectAllTimes >= AllTimes && m_NetworkContainer != null)
+ {
+ TempCheck += Time.deltaTime;
+ m_NetworkContainer.SetActive(true);
+ if (TempCheck >= WaitSeconds)
{
- m_TotalProgressSlider.ResetValue(0f);
- }
-
- // m_AlphaTween.SetStartState();
-
- m_BuildTime.text = VersionConfig.Get().debugVersion ? VersionConfig.Get().buildTime : "";
-
- if (m_NetworkContainer != null)
- {
+ TempCheck = 0;
m_NetworkContainer.SetActive(false);
- }
+ HttpBehaviour.ConnectAllTimes = 0;
+ }
+ }
+ }
- var AppleCheck = InitialFunctionConfig.Get("CheckTime").Numerical1;
- var AndroidCheck = InitialFunctionConfig.Get("CheckTime").Numerical2;
- var CheckAll = InitialFunctionConfig.Get("NetworkCheck").Numerical1;
- AllTimes = int.Parse(CheckAll);
- var CheckTime = InitialFunctionConfig.Get("NetworkCheck").Numerical2;
- WaitSeconds = int.Parse(CheckTime);
- ShowCircleView = false;
- if (Application.platform == RuntimePlatform.IPhonePlayer && AppleCheck == "1")
- ShowCircleView = true;
- if (Application.platform == RuntimePlatform.Android && AndroidCheck == "1")
- ShowCircleView = true;
+ private void OpenUserHelp()
+ {
+ // TODO YYL
+ // UIManager.Instance.OpenWindow<UserHelpWin>();
+ }
+
+ private void UpdateProgress()
+ {
+ //if (Application.platform == RuntimePlatform.IPhonePlayer)
+ if(ShowCircleView)
+ {
+ m_IosProgressContainer.SetActive(LaunchInHot.progressInfo.stage != LaunchStage.DownLoad);
+ var remainder = ((int)Time.time) % 3;
+ var dot = remainder == 0 ? "." : remainder == 1 ? ".." : "...";
+ m_IosProgressTip.text = StringUtility.Concat(Language.GetFromLocal(30), dot);
+ }
+ else
+ {
+ var progressInfo = LaunchInHot.progressInfo;
- if (ShowCircleView)
+ if (progressInfo.stage == LaunchStage.DownLoad)
{
- m_AndroidProgressContainer.SetActive(false);
- m_IosProgressContainer.SetActive(true);
- m_Version.text = string.Empty;
+ // if (m_PartProgressSlider != null && m_PartProgressSlider.gameObject.activeInHierarchy)
+ // {
+ // m_PartProgressSlider.SetActive(false);
+ // }
+
+ if (m_TotalProgressSlider != null && m_TotalProgressSlider.gameObject.activeInHierarchy)
+ {
+ m_TotalProgressSlider.SetActive(false);
+ }
}
else
{
- m_AndroidProgressContainer.SetActive(true);
- m_IosProgressContainer.SetActive(false);
- //鎵撳寘鐗堟湰 + 鍔熻兘鐗堟湰 + 璇█ID
- m_Version.text = LoginManager.Instance.GetVersionStr();
- }
+ // if (m_PartProgressSlider != null && !m_PartProgressSlider.gameObject.activeInHierarchy)
+ // {
+ // m_PartProgressSlider.SetActive(true);
+ // }
- if (m_StageDescription != null)
- {
- m_StageDescription.text = GetLaunchStageDescription(showStage, showStep);
- }
-
- UpdateProgress();
-
- if (m_TotalProgressSlider == null)
- {
- m_TotalProgressSlider = this.GetComponentInChildren<SmoothSlider>(true);
- }
- }
-
- protected override void OnOpen()
- {
- base.OnOpen();
- }
-
- protected override void OnPreClose()
- {
- base.OnPreClose();
- }
-
- protected override void OnClose()
- {
- base.OnClose();
- }
-
- public void FadeOut()
- {
- // m_AlphaTween.Play();
- CloseWindow();
- }
-
- string GetLaunchStageDescription(LaunchStage _stage, int step)
- {
- switch (_stage)
- {
- case LaunchStage.SDKInit:
- return Language.GetFromLocal(36);
- case LaunchStage.AssetCopy:
- return StringUtility.Concat(Language.GetFromLocal(37), "(", step.ToString(), ")");
- case LaunchStage.AssetDecompress:
- return StringUtility.Concat(Language.GetFromLocal(38), "(", step.ToString(), ")");
- case LaunchStage.ClientVersion:
- return Language.GetFromLocal(39);
- case LaunchStage.CheckAsset:
- return Language.GetFromLocal(40);
- case LaunchStage.DownLoad:
- return Language.GetFromLocal(41);
- case LaunchStage.AssetBundleInit:
- return Language.GetFromLocal(42);
- case LaunchStage.ConfigInit:
- return StringUtility.Concat(Language.GetFromLocal(43), "(", step.ToString(), ")");
- case LaunchStage.Complete:
- return Language.GetFromLocal(44);
- default:
- return "";
- }
- }
-
- protected void LateUpdate()
- {
- UpdateProgress();
-
- // backGroundTimer += Time.deltaTime;
- // if (backGroundTimer >= 3f)
- // {
- // backGroundTimer = 0f;
- // if (backGrounds.Count > 1)
- // {
- // m_BackGround.overrideSprite = backGrounds[(++backGroundIndex) % backGrounds.Count];
- // }
- // }
-
- if (HttpBehaviour.ConnectAllTimes >= AllTimes && m_NetworkContainer != null)
- {
- TempCheck += Time.deltaTime;
- m_NetworkContainer.SetActive(true);
- if (TempCheck >= WaitSeconds)
+ if (m_TotalProgressSlider != null && !m_TotalProgressSlider.gameObject.activeInHierarchy)
{
- TempCheck = 0;
- m_NetworkContainer.SetActive(false);
- HttpBehaviour.ConnectAllTimes = 0;
- }
- }
- }
-
- private void OpenUserHelp()
- {
- // TODO YYL
- // UIManager.Instance.OpenWindow<UserHelpWin>();
- }
-
- private void UpdateProgress()
- {
- //if (Application.platform == RuntimePlatform.IPhonePlayer)
- if(ShowCircleView)
- {
- m_IosProgressContainer.SetActive(LaunchInHot.progressInfo.stage != LaunchStage.DownLoad);
- var remainder = ((int)Time.time) % 3;
- var dot = remainder == 0 ? "." : remainder == 1 ? ".." : "...";
- m_IosProgressTip.text = StringUtility.Concat(Language.GetFromLocal(30), dot);
- }
- else
- {
- var progressInfo = LaunchInHot.progressInfo;
-
- if (progressInfo.stage == LaunchStage.DownLoad)
- {
- if (m_PartProgressSlider != null && m_PartProgressSlider.gameObject.activeInHierarchy)
- {
- m_PartProgressSlider.SetActive(false);
- }
-
- if (m_TotalProgressSlider != null && m_TotalProgressSlider.gameObject.activeInHierarchy)
- {
- m_TotalProgressSlider.SetActive(false);
- }
- }
- else
- {
- if (m_PartProgressSlider != null && !m_PartProgressSlider.gameObject.activeInHierarchy)
- {
- m_PartProgressSlider.SetActive(true);
- }
-
- if (m_TotalProgressSlider != null && !m_TotalProgressSlider.gameObject.activeInHierarchy)
- {
- m_TotalProgressSlider.SetActive(true);
- }
-
- if (m_TotalProgressSlider != null)
- {
- m_TotalProgressSlider.value = progressInfo.totalProgress;
- }
-
- if (m_PartProgressSlider != null)
- {
- m_PartProgressSlider.value = progressInfo.partProgress;
- }
+ m_TotalProgressSlider.SetActive(true);
}
- DisplayStageDescription(progressInfo.stage, progressInfo.step);
-
- //if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
- //{
- // assetBuildTimeShowed = true;
- // var totalMinute = (int)(AssetVersionUtility.assetsBuildTime - new DateTime(2018, 1, 1)).TotalMinutes;
- // m_Version.text = StringUtility.Concat(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", totalMinute.ToString());
- //}
- }
-
- }
-
- private void DisplayStageDescription(LaunchStage stage, int step)
- {
- if (showStage != stage || showStep != step)
- {
- showStage = stage;
- showStep = step;
- if (m_StageDescription != null)
+ if (m_TotalProgressSlider != null)
{
- m_StageDescription.text = GetLaunchStageDescription(stage, step);
+ m_TotalProgressSlider.value = progressInfo.totalProgress;
}
- }
- }
- public LaunchWinData GetData()
- {
- return new LaunchWinData(){
- backGroundTimer = backGroundTimer,
- backGroundIndex = backGroundIndex,
- // sprite = m_BackGround.overrideSprite,
- sprites = backGrounds,
- };
+ // if (m_PartProgressSlider != null)
+ // {
+ // m_PartProgressSlider.value = progressInfo.partProgress;
+ // }
+ }
+
+ DisplayStageDescription(progressInfo.stage, progressInfo.step);
+
+ //if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
+ //{
+ // assetBuildTimeShowed = true;
+ // var totalMinute = (int)(AssetVersionUtility.assetsBuildTime - new DateTime(2018, 1, 1)).TotalMinutes;
+ // m_Version.text = StringUtility.Concat(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", totalMinute.ToString());
+ //}
}
}
+ private void DisplayStageDescription(LaunchStage stage, int step)
+ {
+ if (showStage != stage || showStep != step)
+ {
+ showStage = stage;
+ showStep = step;
+ if (m_StageDescription != null)
+ {
+ m_StageDescription.text = GetLaunchStageDescription(stage, step);
+ }
+ }
+ }
+
+ public LaunchWinData GetData()
+ {
+ return new LaunchWinData(){
+ backGroundTimer = backGroundTimer,
+ backGroundIndex = backGroundIndex,
+ // sprite = m_BackGround.overrideSprite,
+ sprites = backGrounds,
+ };
+ }
+
+}
+
diff --git a/Main/System/Launch/LoadingWin.cs b/Main/System/Launch/LoadingWin.cs
index 6453dba..07c41b9 100644
--- a/Main/System/Launch/LoadingWin.cs
+++ b/Main/System/Launch/LoadingWin.cs
@@ -11,8 +11,8 @@
// [SerializeField] UIAlphaTween m_AlphaTween;
[SerializeField] RawImage m_BackGround;
- [SerializeField] SmoothSlider m_PartProgressSlider;
- [SerializeField] SmoothSlider m_TotalProgressSlider;
+ // [SerializeField] SmoothSlider m_PartProgressSlider;
+ [SerializeField] Slider m_TotalProgressSlider;
[SerializeField] Text m_StageDescription;
[SerializeField] Text m_Version;
// [SerializeField] Button m_UserHelp;
@@ -92,12 +92,12 @@
{
currentProgress = (int)Mathf.Lerp(currentProgress, targetProgress, 0.1f);
m_TotalProgressSlider.value = currentProgress / 100f;
- m_PartProgressSlider.value = currentProgress / 100f;
+ // m_PartProgressSlider.value = currentProgress / 100f;
}
else
{
m_TotalProgressSlider.value = currentProgress / 100f;
- m_PartProgressSlider.value = currentProgress / 100f;
+ // m_PartProgressSlider.value = currentProgress / 100f;
}
CopiedLogic_UpdateProgress();
}
diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index 0ff99d4..cad55b9 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -58,6 +58,7 @@
RenameManager.Instance.OnUpdateRenameResultEvent += OnUpdateRenameResultEvent;
UIManager.Instance.OnCloseWindow += OnCloseWindow;
GlobalTimeEvent.Instance.MSEvent += OnMSEvent;
+ EventBroadcast.Instance.AddListener<string>(EventName.BATTLE_START, OnBattleStart);
base.OnPreOpen();
// 鍒锋柊UI
@@ -71,6 +72,7 @@
RenameManager.Instance.OnUpdateRenameResultEvent -= OnUpdateRenameResultEvent;
UIManager.Instance.OnCloseWindow -= OnCloseWindow;
GlobalTimeEvent.Instance.MSEvent -= OnMSEvent;
+ EventBroadcast.Instance.RemoveListener<string>(EventName.BATTLE_START, OnBattleStart);
base.OnPreClose();
isForcePlayFightUIAnim = true;
@@ -345,7 +347,24 @@
}
}
+ void OnBattleStart(string guid)
+ {
+ if (string.IsNullOrEmpty(guid))
+ {
+ var tmpHero = TeamManager.Instance.GetTeam(TeamType.Story).GetNextServerHero("");
+ if (tmpHero != null)
+ {
+ AutoFightModel.Instance.fightingHeroSkinID = tmpHero.SkinID;
+ }
+ else
+ {
+ Debug.LogError("娌℃湁鎵惧埌涓嬩竴涓敾鍑绘灏�");
+ return;
+ }
+ fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead");
+ }
+ }
void RefreshFightIng(bool isfighting = false)
{
diff --git a/Main/System/MainLevel/MainLevelDropCell.cs b/Main/System/MainLevel/MainLevelDropCell.cs
index 3a4f34e..af83a4a 100644
--- a/Main/System/MainLevel/MainLevelDropCell.cs
+++ b/Main/System/MainLevel/MainLevelDropCell.cs
@@ -52,8 +52,15 @@
}
int curValue = 0;
MainLevelManager.Instance.m_DailyBootyDict.TryGetValue(itemID, out curValue);
- dropValueText.text = UIHelper.AppendColor(curValue >= maxValue ? TextColType.Red : TextColType.Green,
- UIHelper.ReplaceLargeNum(curValue) + "/" + UIHelper.ReplaceLargeNum(maxValue));
+ if (maxValue > 1000000000)
+ {
+ dropValueText.text = UIHelper.AppendColor(TextColType.Green, UIHelper.ReplaceLargeNum(curValue) + "/" + Language.Get("L1138"));
+ }
+ else
+ {
+ dropValueText.text = UIHelper.AppendColor(curValue >= maxValue ? TextColType.Red : TextColType.Green,
+ UIHelper.ReplaceLargeNum(curValue) + "/" + UIHelper.ReplaceLargeNum(maxValue));
+ }
}
}
diff --git a/Main/System/Sound/SoundPlayer.cs b/Main/System/Sound/SoundPlayer.cs
index e91c270..d8c553f 100644
--- a/Main/System/Sound/SoundPlayer.cs
+++ b/Main/System/Sound/SoundPlayer.cs
@@ -355,14 +355,14 @@
}
}
- //public void PlayLoginMusic()
- //{
- // var loginMusic = BuiltInLoader.LoadMusic("Music_Login");
- // if (!m_MusicAudioSource.isPlaying || m_MusicAudioSource.clip != loginMusic)
- // {
- // StartCoroutine(Co_BackGroundMusicFadeOutIn(loginMusic, false));
- // }
- //}
+ public void PlayLoginMusic()
+ {
+ var loginMusic = BuiltInLoader.LoadMusic("login");
+ if (!m_MusicAudioSource.isPlaying || m_MusicAudioSource.clip != loginMusic)
+ {
+ StartCoroutine(Co_BackGroundMusicFadeOutIn(loginMusic, false));
+ }
+ }
//private void LateUpdate()
//{
diff --git a/Main/System/UIBase/OneLevelWin.cs b/Main/System/UIBase/OneLevelWin.cs
index 602a86a..be5cde9 100644
--- a/Main/System/UIBase/OneLevelWin.cs
+++ b/Main/System/UIBase/OneLevelWin.cs
@@ -26,6 +26,8 @@
tabButtons[i] = go.GetComponent<GroupButtonEx>();
tabButtons[i].selectIcon.SetSprite(data.iconName);
tabButtons[i].selectIcon.SetNativeSize();
+ tabButtons[i].unSelectIcon.SetSprite(data.unSelectIconName);
+ tabButtons[i].unSelectIcon.SetNativeSize();
tabButtons[i].title.text = Language.Get(data.name);
tabButtons[i].redpoint.redpointId = data.redpointID;
tabButtons[i].SetActive(true);
@@ -48,4 +50,5 @@
public int redpointID;
public string name;
public string iconName; //榛樿鏄剧ず鐨勫浘鏍囷紙閫変腑锛�
+ public string unSelectIconName; //鍥炬爣锛堟湭閫変腑锛�
}
\ No newline at end of file
--
Gitblit v1.8.0