UI换了很多,spine主视觉停用
This commit is contained in:
@@ -36,6 +36,9 @@ public class dailyTaskManager : MonoBehaviour
|
||||
[Header("reward sprites")]
|
||||
public Sprite coinRewardSprite;
|
||||
|
||||
[Header("reward availability visuals")]
|
||||
[SerializeField] private Material unavailableRewardMaterial;
|
||||
|
||||
private readonly List<GameObject> spawnedTaskItems = new List<GameObject>();
|
||||
private readonly Dictionary<int, Sprite> rewardSpriteByItemId = new Dictionary<int, Sprite>();
|
||||
private readonly Dictionary<int, storeItemSO> rewardStoreItemByItemId = new Dictionary<int, storeItemSO>();
|
||||
@@ -79,7 +82,7 @@ public class dailyTaskManager : MonoBehaviour
|
||||
if (notasksanymore != null)
|
||||
{
|
||||
notasksanymore.gameObject.SetActive(tasks.Count == 0);
|
||||
notasksanymore.text = tasks.Count == 0 ? "今日暂无任务" : string.Empty;
|
||||
notasksanymore.text = tasks.Count == 0 ? LocalizationService.Get("daily.no_tasks", "今日暂无任务") : string.Empty;
|
||||
}
|
||||
|
||||
int completedCount = 0;
|
||||
@@ -120,7 +123,12 @@ public class dailyTaskManager : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
controller.Setup(taskView, index + 1, ResolveRewardSprite(taskView.definition), () => OnSingleRewardClicked(taskView.runtimeEntry.taskID));
|
||||
controller.Setup(
|
||||
taskView,
|
||||
index + 1,
|
||||
ResolveRewardSprite(taskView.definition),
|
||||
() => OnSingleRewardClicked(taskView.runtimeEntry.taskID),
|
||||
unavailableRewardMaterial);
|
||||
}
|
||||
|
||||
private void UpdateTodayProgress(int totalTaskCount, int completedCount)
|
||||
@@ -218,7 +226,7 @@ public class dailyTaskManager : MonoBehaviour
|
||||
{
|
||||
if (string.IsNullOrEmpty(failureMessage))
|
||||
{
|
||||
failureMessage = "暂无可领取奖励";
|
||||
failureMessage = LocalizationService.Get("daily.no_claimable_reward", "暂无可领取奖励");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(failureMessage))
|
||||
@@ -267,7 +275,7 @@ public class dailyTaskManager : MonoBehaviour
|
||||
{
|
||||
if (taskPool == null)
|
||||
{
|
||||
gNotice.warning.display("未配置任务池");
|
||||
gNotice.warning.display(LocalizationService.Get("daily.pool_missing", "未配置任务池"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -276,11 +284,11 @@ public class dailyTaskManager : MonoBehaviour
|
||||
{
|
||||
if (taskService.GetRemainingRefreshCount() <= 0)
|
||||
{
|
||||
gNotice.warning.display("已达到今日刷新上限");
|
||||
gNotice.warning.display(LocalizationService.Get("daily.refresh_limit_reached", "已达到今日刷新上限"));
|
||||
}
|
||||
else
|
||||
{
|
||||
gNotice.warning.display("刷新失败");
|
||||
gNotice.warning.display(LocalizationService.Get("daily.refresh_failed", "刷新失败"));
|
||||
}
|
||||
|
||||
RefreshTaskButtonState();
|
||||
@@ -383,7 +391,7 @@ public class dailyTaskManager : MonoBehaviour
|
||||
{
|
||||
if (definition == null)
|
||||
{
|
||||
return gItemGet.Create("未知奖励", null, 1, ItemRarity.None);
|
||||
return gItemGet.Create(LocalizationService.Get("item.unknown.reward", "未知奖励"), null, 1, ItemRarity.None);
|
||||
}
|
||||
|
||||
switch (definition.rewardType)
|
||||
@@ -424,7 +432,7 @@ public class dailyTaskManager : MonoBehaviour
|
||||
}
|
||||
|
||||
default:
|
||||
return gItemGet.Create("未知奖励", null, Mathf.Max(1, definition.rewardAmount), ItemRarity.None);
|
||||
return gItemGet.Create(LocalizationService.Get("item.unknown.reward", "未知奖励"), null, Mathf.Max(1, definition.rewardAmount), ItemRarity.None);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user