备份CatanBuilding瘦身独立工程
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
|
||||
public class EventGatherCoreInfoPanelDummyRewardView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private RewardItemNew[] rewards;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
var firstStageId = EventGatherCoreAct.Ctx.GetStageId(0);
|
||||
var rewardDic = EventGatherCoreAct.Ctx.GetRewardViewInfo(firstStageId);
|
||||
for (int i = 0; i < rewards.Length; i++)
|
||||
{
|
||||
if (rewardDic.Keys.Contains(i))
|
||||
{
|
||||
var rewardItem = EventGatherCoreAct.Ctx.GetReward(rewardDic[i].RewardId, out _);
|
||||
rewards[i].SetData(rewardItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[EventGatherCore] Reward index mismatch: \"{i}\" not found in dictionary keys.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user