154 lines
3.7 KiB
C#
154 lines
3.7 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Cute;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
|
|
public class AreaSelInfo : MonoBehaviour
|
|
{
|
|
private enum eTableCategory
|
|
{
|
|
}
|
|
|
|
private static readonly Vector3 CLEARPRESENT_CARD_COLLISIONSIZE = new Vector3(175f, 230f, 1f);
|
|
|
|
private static readonly string[] CLEARPRESENT_NAME = new string[10] { "", "Common_0205", "", "Common_0201", "", "", "", "", "", "Common_0115" };
|
|
|
|
private static readonly string[] CLEARPRESENT_THUMBNAIL_SPRITENAME = new string[10] { "", "thumbnail_liquid", "", "thumbnail_crystal", "", "", "thumbnail_card", "thumbnail_emblem", "thumbnail_title", "thumbnail_rupy" };
|
|
|
|
private readonly Vector3 REWARD_TABLE_DEFAULT_POSITION = new Vector3(45f, -85.3f, 0f);
|
|
|
|
private readonly Vector3 REWARD_TABLE_CARD_POSITION = new Vector3(28.5f, -85.3f, 0f);
|
|
|
|
private readonly Dictionary<UserGoods.Type, float> REWARD_BG_OFFSET_MAGNIFICATION = new Dictionary<UserGoods.Type, float>
|
|
{
|
|
{
|
|
UserGoods.Type.Degree,
|
|
2f
|
|
},
|
|
{
|
|
UserGoods.Type.Card,
|
|
1.2f
|
|
},
|
|
{
|
|
UserGoods.Type.Sleeve,
|
|
1.2f
|
|
},
|
|
{
|
|
UserGoods.Type.Skin,
|
|
1.2f
|
|
},
|
|
{
|
|
UserGoods.Type.RedEther,
|
|
1f
|
|
},
|
|
{
|
|
UserGoods.Type.Rupy,
|
|
1f
|
|
},
|
|
{
|
|
UserGoods.Type.Item,
|
|
1f
|
|
},
|
|
{
|
|
UserGoods.Type.Emblem,
|
|
1f
|
|
}
|
|
};
|
|
|
|
private List<AreaSelectClearReward> _clearRewardList = new List<AreaSelectClearReward>();
|
|
|
|
[SerializeField]
|
|
private UITable _tableRoot;
|
|
|
|
[SerializeField]
|
|
private UITable[] _tableRewardsCategory = new UITable[3];
|
|
|
|
[SerializeField]
|
|
private GameObject _cardObjEvacuationRoot;
|
|
|
|
[SerializeField]
|
|
private UISprite _spriteRewardBackground;
|
|
|
|
[SerializeField]
|
|
private UILabel _labelAcquired;
|
|
|
|
private List<UIBase_CardManager.CardObjData> _cardObjList = new List<UIBase_CardManager.CardObjData>();
|
|
|
|
private CardDetailUI _cardDetail;
|
|
|
|
private List<string> _loadFileList = new List<string>();
|
|
|
|
private bool _isLoadEnd = true;
|
|
|
|
public static string GetPresentItemName(int itemID, long userGoodsId)
|
|
{
|
|
switch ((UserGoods.Type)itemID)
|
|
{
|
|
case UserGoods.Type.RedEther:
|
|
case UserGoods.Type.Rupy:
|
|
return Data.SystemText.Get(CLEARPRESENT_NAME[itemID]);
|
|
case UserGoods.Type.Item:
|
|
{
|
|
Item item = Data.Master.ItemList.Find((Item data) => data.UserGoodsId == userGoodsId);
|
|
if (item == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return item.name;
|
|
}
|
|
case UserGoods.Type.Sleeve:
|
|
{
|
|
Sleeve sleeve = Data.Master.SleeveMgr.Get(userGoodsId);
|
|
if (sleeve == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return sleeve.sleeve_name;
|
|
}
|
|
case UserGoods.Type.Emblem:
|
|
{
|
|
Emblem emblem = Data.Master.EmblemMgr.Get(userGoodsId);
|
|
if (emblem == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return emblem._name;
|
|
}
|
|
case UserGoods.Type.Degree:
|
|
{
|
|
Degree degree = Data.Master.DegreeMgr.Get((int)userGoodsId);
|
|
if (degree == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return degree._name;
|
|
}
|
|
case UserGoods.Type.Skin:
|
|
{
|
|
ClassCharacterMasterData charaPrmByCharaId = null; // Pre-Phase-5b: no chara master headless
|
|
if (charaPrmByCharaId == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return charaPrmByCharaId.chara_name;
|
|
}
|
|
case UserGoods.Type.SpotCardPoint:
|
|
return Data.SystemText.Get("Common_0161");
|
|
case UserGoods.Type.MyPageBG:
|
|
return Data.Master.MyPageCustomBGMaster[userGoodsId.ToString()].Name;
|
|
default:
|
|
return string.Empty;
|
|
}
|
|
}
|
|
|
|
public static string GetPresentItemSpriteName(int itemID)
|
|
{
|
|
if (itemID < 0 || itemID >= CLEARPRESENT_THUMBNAIL_SPRITENAME.Length)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
return CLEARPRESENT_THUMBNAIL_SPRITENAME[itemID];
|
|
}
|
|
}
|