装备系统完结,修复并加入很多
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -47,6 +47,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
[SerializeField] Ease prefab_Enter_Ease = Ease.OutCubic;
|
||||
|
||||
[SerializeField] Button button_Idol;
|
||||
[SerializeField] GameObject ui_Panel_Idol;
|
||||
[SerializeField] Button button_Select_Music;
|
||||
[SerializeField] string ui_Select_Music_Scene_Name= "selectYourSongFirst";
|
||||
|
||||
@@ -275,7 +276,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
|
||||
yield return null;
|
||||
|
||||
// 读取保存的角色 ID 并初始化索引
|
||||
// 璇诲彇淇濆瓨鐨勮鑹?ID 骞跺垵濮嬪寲绱㈠紩
|
||||
int savedHeroID = PlayerPrefs.GetInt("SelectedMainHeroID", -1);
|
||||
if (savedHeroID != -1)
|
||||
{
|
||||
@@ -314,14 +315,14 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
button_Story.onClick.AddListener(
|
||||
() =>
|
||||
{
|
||||
gNotice.warning.display("此版本未开放该功能");
|
||||
gNotice.warning.display("姝ょ増鏈湭寮€鏀捐鍔熻兘");
|
||||
//Try_Open_Panel(ui_Panel_Story);
|
||||
});
|
||||
if (button_Idol != null)
|
||||
button_Idol.onClick.AddListener(
|
||||
() =>
|
||||
{
|
||||
gNotice.warning.display("此版本未开放该功能");
|
||||
Toggle_Panel(ui_Panel_Idol);
|
||||
});
|
||||
if (music_Player != null && music_Player.Button_List != null)
|
||||
music_Player.Button_List.onClick.AddListener(
|
||||
@@ -356,6 +357,30 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
return true;
|
||||
}
|
||||
|
||||
void Toggle_Panel(GameObject panel)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (panel.activeSelf)
|
||||
{
|
||||
panel.SetActive(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (panel == ui_Panel_Setting)
|
||||
{
|
||||
UI_SettingsPanelEnterAnim enterAnim = panel.GetComponent<UI_SettingsPanelEnterAnim>();
|
||||
if (enterAnim == null)
|
||||
enterAnim = panel.AddComponent<UI_SettingsPanelEnterAnim>();
|
||||
enterAnim.enabled = true;
|
||||
}
|
||||
|
||||
panel.SetActive(true);
|
||||
}
|
||||
|
||||
GameObject Try_Open_Prefab(GameObject prefab, ref GameObject instance)
|
||||
{
|
||||
if (prefab == null) return null;
|
||||
@@ -636,7 +661,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
{
|
||||
hover = startButton.gameObject.AddComponent<UI_StartButtonHover>();
|
||||
}
|
||||
hover.ApplyTexts("执行任务", "Start", "意志复演", "REITERATION OF WILL");
|
||||
hover.ApplyTexts("鎵ц浠诲姟", "Start", "鎰忓織澶嶆紨", "REITERATION OF WILL");
|
||||
}
|
||||
void Setup_RightButtons_Hover()
|
||||
{
|
||||
@@ -771,7 +796,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
c_Character_Illustration_Anim = StartCoroutine(C_Character_Illustration_Anim(canvasGroup, () =>
|
||||
{
|
||||
image_Character.sprite = sprite;
|
||||
// image_Character.SetNativeSize(); // 注释掉 SetNativeSize 以防改变目标图片大小
|
||||
// image_Character.SetNativeSize(); // 娉ㄩ噴鎺?SetNativeSize 浠ラ槻鏀瑰彉鐩爣鍥剧墖澶у皬
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -3562,9 +3587,9 @@ public class UI_JiantouHover : MonoBehaviour, IPointerEnterHandler, IPointerExit
|
||||
|
||||
public class UI_StartButtonHover : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
string offCn = "执行任务";
|
||||
string offCn = "鎵ц浠诲姟";
|
||||
string offEn = "Start";
|
||||
string onCn = "意志复演";
|
||||
string onCn = "鎰忓織澶嶆紨";
|
||||
string onEn = "REITERATION OF WILL";
|
||||
float charInterval = 0.03f;
|
||||
Text cnText;
|
||||
@@ -3719,7 +3744,7 @@ public class UI_StartButtonHover : MonoBehaviour, IPointerEnterHandler, IPointer
|
||||
char[] filler = new char[remain];
|
||||
for (int r = 0; r < remain; r++)
|
||||
{
|
||||
filler[r] = useDot ? '路' : randomChars[(i + r) % randomChars.Length];
|
||||
filler[r] = useDot ? '.' : randomChars[(i + r) % randomChars.Length];
|
||||
}
|
||||
suffix = new string(filler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user