阶段性完成
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using I2.Loc;
|
||||
using UnityEngine;
|
||||
using Ichni.Localization;
|
||||
using Ichni.UI;
|
||||
using Michsky.MUIP;
|
||||
using Sirenix.OdinInspector;
|
||||
@@ -23,6 +23,10 @@ namespace Ichni.RhythmGame
|
||||
public Image characterImage;
|
||||
public TMP_Text characterNameText;
|
||||
public TMP_Text sentenceText;
|
||||
[Tooltip("角色名的 Unity Localization 文本。应配置 UI/ui_summary_soullies_name。")]
|
||||
public LocalizedTMPText characterNameLocalizedText;
|
||||
[Tooltip("角色短句的 Unity Localization 文本。应配置 UI/ui_summary_soullies_sentence_0。")]
|
||||
public LocalizedTMPText sentenceLocalizedText;
|
||||
|
||||
[Title("Difficulty")]
|
||||
public TMP_Text difficultyText;
|
||||
@@ -61,8 +65,12 @@ namespace Ichni.RhythmGame
|
||||
|
||||
illustrationImage.sprite = info.song.illustration;
|
||||
|
||||
characterNameText.GetComponent<Localize>().SetTerm("Characters/Soullies");
|
||||
sentenceText.GetComponent<Localize>().SetTerm("Sentences/Soullies_Summary_Sentence_0");
|
||||
// Summary 页面没有再依赖 I2 Term。迁移期间允许旧场景先不绑定新字段:
|
||||
// 此时不会中断结算页面;完成 Inspector 配置后,两个 LocalizedTMPText 会自动跟随 Locale 切换。
|
||||
characterNameLocalizedText ??= characterNameText.GetComponent<LocalizedTMPText>();
|
||||
sentenceLocalizedText ??= sentenceText.GetComponent<LocalizedTMPText>();
|
||||
characterNameLocalizedText?.RefreshText();
|
||||
sentenceLocalizedText?.RefreshText();
|
||||
|
||||
difficultyText.text = info.difficulty.GetDifficultyName();
|
||||
levelText.text = info.difficulty.difficultyValue.ToString();
|
||||
@@ -89,4 +97,4 @@ namespace Ichni.RhythmGame
|
||||
backButton.onClick.AddListener(GameManager.ReturnToMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user