主界面添加,许多bug修复。祝贺黑盒1如期开始
This commit is contained in:
@@ -270,6 +270,17 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
|
||||
yield return null;
|
||||
|
||||
// 读取保存的角色 ID 并初始化索引
|
||||
int savedHeroID = PlayerPrefs.GetInt("SelectedMainHeroID", -1);
|
||||
if (savedHeroID != -1)
|
||||
{
|
||||
int foundIndex = data_List.FindIndex(h => h.ally_heroID == savedHeroID);
|
||||
if (foundIndex != -1)
|
||||
{
|
||||
character_Index = foundIndex;
|
||||
}
|
||||
}
|
||||
|
||||
Character_Index = character_Index;
|
||||
if(Character_Index >= 0 && Character_Index < data_List.Count)
|
||||
Set_Character_Illustration(Get_Character_Image_Data(Character_Index).ally_hero_HD_image);
|
||||
|
||||
Reference in New Issue
Block a user