1
This commit is contained in:
@@ -99,13 +99,33 @@ public class RankLineItem : MonoBehaviour
|
||||
}
|
||||
if (giftItems != null && giftItems.Count > 0)
|
||||
{
|
||||
// 先清空旧奖励道具
|
||||
for (int i = backPackPropItemRarent.childCount - 1; i >= 0; i--)
|
||||
Destroy(backPackPropItemRarent.GetChild(i).gameObject);
|
||||
|
||||
foreach (var gift in giftItems)
|
||||
{
|
||||
if (gift?.product == null) continue;
|
||||
string imageUrl = gift.product?.imageUrl;
|
||||
int propType = gift.product?.type ?? 0;
|
||||
int count = gift.isRandom ? gift.minCount : gift.count;
|
||||
|
||||
// product 为空时,用 otherId 查道具表
|
||||
if (string.IsNullOrEmpty(imageUrl) && !string.IsNullOrEmpty(gift.otherId))
|
||||
{
|
||||
var propConfig = GameManager.Instance?.gameConfig?.propConfig;
|
||||
var match = propConfig?.Find(p => p.number == gift.otherId);
|
||||
if (match != null)
|
||||
{
|
||||
imageUrl = match.imageUrl;
|
||||
propType = match.type;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(imageUrl)) continue;
|
||||
|
||||
GameObject obj = Instantiate(backPackPropItemPrefab.gameObject, backPackPropItemRarent);
|
||||
var tempItem = obj.GetComponent<BackPackPropItem>();
|
||||
int count = gift.isRandom ? gift.minCount : gift.count;
|
||||
tempItem.Init(APIManager.baseURL + gift.product.imageUrl, count, (PropEnum)gift.product.type);
|
||||
tempItem.Init(APIManager.baseURL + imageUrl, count, (PropEnum)propType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3697,7 +3697,7 @@ Animator:
|
||||
m_GameObject: {fileID: 4901081416388548652}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: c49a04a434d2b374bac9a8f5fa95f58c, type: 2}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
|
||||
@@ -168,6 +168,12 @@ public class UIHome_BY_ServicePanel : SubUIBase
|
||||
WebSocketManager.Instance.Close(SocketType.customer);
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
_historyLoaded = false;
|
||||
}
|
||||
|
||||
// ==================== 滚动 ====================
|
||||
|
||||
public void ScrollToBottom()
|
||||
|
||||
@@ -25687,7 +25687,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 117.685, y: -25}
|
||||
m_SizeDelta: {x: 235.37, y: 50}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4614401808319948171
|
||||
CanvasRenderer:
|
||||
@@ -26912,8 +26912,6 @@ MonoBehaviour:
|
||||
tmp_Level: {fileID: 8900623682585849961}
|
||||
tmp_Exp: {fileID: 1047680223030018608}
|
||||
slider_LevelExp: {fileID: 4660069166699375746}
|
||||
sprite_Gold: {fileID: 21300000, guid: f913511fd7e863d45ac93b62c7fd4354, type: 3}
|
||||
sprite_Diamond: {fileID: 21300000, guid: fb8cf8f90dbe44b41b021f64c8d08a56, type: 3}
|
||||
levelGiftitemPrefab: {fileID: 1047101946899589180}
|
||||
levelGiftitemParent: {fileID: 5436103631707523789}
|
||||
levelGiftitem_100: {fileID: 8284596759256177780}
|
||||
|
||||
Reference in New Issue
Block a user