cull(engine-cleanup): pass-8 phase-2 cascade round 2 after GachaUI stub
This commit is contained in:
@@ -13,34 +13,6 @@ public class CenteringUIWidget : MonoBehaviour
|
||||
[SerializeField]
|
||||
private bool _isCenteringVertical;
|
||||
|
||||
public void Reposition()
|
||||
{
|
||||
if (_offset == null || (!_isCenteringHorizontal && !_isCenteringVertical))
|
||||
{
|
||||
return;
|
||||
}
|
||||
UIWidget[] componentsInChildren = _offset.GetComponentsInChildren<UIWidget>();
|
||||
if (componentsInChildren.Length != 0)
|
||||
{
|
||||
_offset.localPosition = Vector3.zero;
|
||||
Bounds bounds = GetBounds(componentsInChildren[0], _offset);
|
||||
for (int i = 1; i < componentsInChildren.Length; i++)
|
||||
{
|
||||
bounds.Encapsulate(GetBounds(componentsInChildren[i], _offset));
|
||||
}
|
||||
Vector3 localPosition = _offset.localPosition;
|
||||
if (_isCenteringHorizontal)
|
||||
{
|
||||
localPosition.x = 0f - bounds.center.x;
|
||||
}
|
||||
if (_isCenteringVertical)
|
||||
{
|
||||
localPosition.y = 0f - bounds.center.y;
|
||||
}
|
||||
_offset.localPosition = localPosition;
|
||||
}
|
||||
}
|
||||
|
||||
private static Bounds GetBounds(UIWidget widget, Transform parent)
|
||||
{
|
||||
if (!(widget is UILabel))
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GachaPointData
|
||||
{
|
||||
public int GachaPoint { get; private set; }
|
||||
|
||||
public int ExchangeableGachaPoint { get; private set; }
|
||||
|
||||
public bool IsExchangeableGachaPoint { get; private set; }
|
||||
|
||||
public int GachaPointPackId { get; set; }
|
||||
|
||||
public int IncreaseGachaPoint { get; set; }
|
||||
|
||||
public GachaPointData(JsonData json)
|
||||
{
|
||||
GachaPoint = json["gacha_point"].ToInt();
|
||||
ExchangeableGachaPoint = json["exchangeable_gacha_point"].ToInt();
|
||||
IsExchangeableGachaPoint = json["is_exchangeable_gacha_point"].ToBoolean();
|
||||
GachaPointPackId = json["pack_id"].ToInt();
|
||||
IncreaseGachaPoint = json["increase_gacha_point"].ToInt();
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,8 @@ public class NotificatonAnimation : MonoBehaviour
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
Result,
|
||||
MaintenanceOnHome,
|
||||
MaintenanceOnResult,
|
||||
GatheringMatching,
|
||||
GachaResult,
|
||||
TemporaryDeckResult,
|
||||
MissionCleared
|
||||
}
|
||||
TemporaryDeckResult }
|
||||
|
||||
public readonly Type _type;
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Wizard;
|
||||
|
||||
public class PackBannerData
|
||||
{
|
||||
}
|
||||
@@ -8,6 +8,5 @@ public enum PackCategory
|
||||
LimitedSpecialCardPack,
|
||||
FreePackLeaderSkin,
|
||||
RotationStarterCardPack,
|
||||
LeaderSkinPack,
|
||||
LegendAndLeaderSkinSinglePack
|
||||
}
|
||||
|
||||
@@ -8,10 +8,4 @@ public class PackChildGachaInfo
|
||||
public int Cost { get; set; }
|
||||
|
||||
public long UserGoodsId { get; set; }
|
||||
|
||||
public int CostGoodsCount => PlayerStaticData.GetItemNum((int)UserGoodsId);
|
||||
|
||||
public int AvailableCount { get; set; }
|
||||
|
||||
public int? FreeGachaCampaignId { get; set; }
|
||||
}
|
||||
|
||||
@@ -18,20 +18,6 @@ public class PackConfig
|
||||
|
||||
public int OverrideUIEffectPackId { get; set; }
|
||||
|
||||
public int TsExchangePosterId { get; set; }
|
||||
|
||||
public bool IsSpecialLayout
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsSpecialCardPack && !IsLegendCardPack && Category != PackCategory.FreePackLeaderSkin && Category != PackCategory.RotationStarterCardPack)
|
||||
{
|
||||
return Category == PackCategory.LegendAndLeaderSkinSinglePack;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSpecialCardPack
|
||||
{
|
||||
get
|
||||
@@ -45,28 +31,4 @@ public class PackConfig
|
||||
}
|
||||
|
||||
public bool IsLegendCardPack => Category == PackCategory.LegendCardPack;
|
||||
|
||||
public bool IsPrerelease { get; set; }
|
||||
|
||||
public List<PurchaseRewardInfo> SpecialPackRewardsList { get; private set; }
|
||||
|
||||
public int GetGachaIdForUIResource()
|
||||
{
|
||||
if (!IsSpecialCardPack)
|
||||
{
|
||||
return PackId;
|
||||
}
|
||||
return OverrideUIEffectPackId;
|
||||
}
|
||||
|
||||
public int GetTicketId()
|
||||
{
|
||||
int result = PackId;
|
||||
PackChildGachaInfo packChildGachaInfo = ChildGachaInfoList.Find((PackChildGachaInfo x) => x.PackType == GachaUI.CardPackType.TICKET_MULTI);
|
||||
if (packChildGachaInfo != null)
|
||||
{
|
||||
result = (int)packChildGachaInfo.UserGoodsId;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,4 @@ namespace Wizard;
|
||||
|
||||
public class PackInfo : HeaderData
|
||||
{
|
||||
private List<PackConfig> m_dataList = new List<PackConfig>();
|
||||
}
|
||||
|
||||
@@ -8,45 +8,16 @@ public class PackOpenTask : BaseTask
|
||||
{
|
||||
public class PackOpenTaskParam : BaseParam
|
||||
{
|
||||
public int parent_gacha_id;
|
||||
|
||||
public int gacha_id;
|
||||
|
||||
public int gacha_type;
|
||||
|
||||
public int pack_number;
|
||||
|
||||
public int[] exclude_card_ids;
|
||||
}
|
||||
|
||||
public class PackOpenStarterPackTaskParam : BaseParam
|
||||
{
|
||||
public int parent_gacha_id;
|
||||
|
||||
public int gacha_id;
|
||||
|
||||
public int gacha_type;
|
||||
|
||||
public int pack_number;
|
||||
|
||||
public int[] exclude_card_ids;
|
||||
|
||||
public int class_id;
|
||||
}
|
||||
|
||||
public class PackOpenAcquireSkinCardPackTaskParam : BaseParam
|
||||
{
|
||||
public int parent_gacha_id;
|
||||
|
||||
public int gacha_id;
|
||||
|
||||
public int gacha_type;
|
||||
|
||||
public int pack_number;
|
||||
|
||||
public int[] exclude_card_ids;
|
||||
|
||||
public int target_card_id;
|
||||
}
|
||||
|
||||
private PackConfig _packConfig;
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class PrereleasePurchaseInfo
|
||||
{
|
||||
public int CurrentCount { get; private set; }
|
||||
|
||||
public int LimitCount { get; private set; }
|
||||
|
||||
public int PreReleasePointCurent { get; private set; }
|
||||
|
||||
public int PreReleasePointLimit { get; private set; }
|
||||
|
||||
public int TicketRupyCountCurrent { get; private set; }
|
||||
|
||||
public int TicketRupyCountLimit { get; private set; }
|
||||
|
||||
public RemainTime RemainTime { get; private set; }
|
||||
|
||||
public List<PurchaseRewardInfo> RewardsList { get; private set; }
|
||||
|
||||
public PrereleasePurchaseInfo(JsonData json, double serverTime)
|
||||
{
|
||||
CurrentCount = json["purchase_count"].ToInt();
|
||||
LimitCount = json["purchase_limit_count"].ToInt();
|
||||
PreReleasePointCurent = json["pre_release_point"].ToInt();
|
||||
PreReleasePointLimit = json["pre_release_point_limit"].ToInt();
|
||||
TicketRupyCountCurrent = json["open_count_by_ticket_and_rupy"].ToInt();
|
||||
TicketRupyCountLimit = json["open_count_limit_by_ticket_and_rupy"].ToInt();
|
||||
RemainTime = new RemainTime(Prerelease.Instance.EndTime.ToString(), serverTime);
|
||||
RewardsList = new List<PurchaseRewardInfo>();
|
||||
JsonData jsonData = json["purchase_reward_list"];
|
||||
for (int i = 0; i < jsonData.Count; i++)
|
||||
{
|
||||
JsonData jsonData2 = jsonData[i];
|
||||
PurchaseRewardInfo purchaseRewardInfo = new PurchaseRewardInfo();
|
||||
JsonData jsonData3 = jsonData2["reward_list"];
|
||||
for (int j = 0; j < jsonData3.Count; j++)
|
||||
{
|
||||
ShopCommonRewardInfo item = new ShopCommonRewardInfo
|
||||
{
|
||||
Type = jsonData3[j]["reward_type"].ToInt(),
|
||||
UserGoodsId = jsonData3[j]["reward_detail_id"].ToLong(),
|
||||
Num = jsonData3[j]["reward_number"].ToInt()
|
||||
};
|
||||
purchaseRewardInfo.RewardInfoList.Add(item);
|
||||
}
|
||||
int num = jsonData2["purchase_count"].ToInt();
|
||||
purchaseRewardInfo.PurchaseNthText = Data.SystemText.Get("Shop_0205", num.ToString());
|
||||
purchaseRewardInfo.IsGet = jsonData2["is_received"].ToBoolean();
|
||||
RewardsList.Add(purchaseRewardInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,45 +46,6 @@ public class PurchaseConfirm : MonoBehaviour
|
||||
[SerializeField]
|
||||
private GameObject _haveObj;
|
||||
|
||||
[SerializeField]
|
||||
private UITable _tablePackPoint;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelBeforPackPoint;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelAfterPackPoint;
|
||||
|
||||
[SerializeField]
|
||||
private UITable _preReleasePointTable;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _preReleasePointBeforeLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _preReleasePointAfterlabel;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _preReleasePointArleadyMax;
|
||||
|
||||
[SerializeField]
|
||||
private Transform _nonItemRoot;
|
||||
|
||||
[SerializeField]
|
||||
private CenteringUIWidget _nonItemCentering;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _nonItemBeforeCountLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _nonItemAfterCountLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _nonItemRemainingLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _nonItemUnitLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _campaignNameLabel;
|
||||
|
||||
@@ -206,14 +167,6 @@ public class PurchaseConfirm : MonoBehaviour
|
||||
_spriteHaveItemIcon.spriteName = spriteName;
|
||||
}
|
||||
|
||||
private void HideIcon()
|
||||
{
|
||||
_spriteConfirmItemIcon.gameObject.SetActive(value: false);
|
||||
_spriteHaveItemIcon.gameObject.SetActive(value: false);
|
||||
m_TextureConfirmTicket.gameObject.SetActive(value: false);
|
||||
m_TextureHaveTicket.gameObject.SetActive(value: false);
|
||||
}
|
||||
|
||||
private void SetLabelText(string itemName, string useItemNumText, int afterItemNum, string unit, string purchaseText, int haveItemCnt)
|
||||
{
|
||||
m_LabelUseItemCnt.text = useItemNumText;
|
||||
@@ -358,13 +311,4 @@ public class PurchaseConfirm : MonoBehaviour
|
||||
_confirmObj.transform.localPosition = new Vector3(0f, -40f, 0f);
|
||||
_haveObj.transform.localPosition = new Vector3(0f, -40f, 0f);
|
||||
}
|
||||
|
||||
private void SetCampaignName(string name)
|
||||
{
|
||||
if (!(_campaignNameLabel == null))
|
||||
{
|
||||
_campaignNameLabel.gameObject.SetActive(value: true);
|
||||
_campaignNameLabel.text = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,4 @@ namespace Wizard;
|
||||
|
||||
public class PurchaseRewardInfo
|
||||
{
|
||||
public string PurchaseNthText { get; set; } = string.Empty;
|
||||
|
||||
public List<ShopCommonRewardInfo> RewardInfoList { get; } = new List<ShopCommonRewardInfo>();
|
||||
|
||||
public bool IsGet { get; set; }
|
||||
}
|
||||
|
||||
@@ -11,19 +11,6 @@ public class RemainTime
|
||||
|
||||
private float _sinceTime;
|
||||
|
||||
public int Second
|
||||
{
|
||||
get
|
||||
{
|
||||
int num = (int)(_endTime - NowUnixTime);
|
||||
if (num < 0)
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
public double NowUnixTime => _serverUnixTime + (double)Time.realtimeSinceStartup - (double)_sinceTime;
|
||||
|
||||
public DateTime TimeInLocal { get; private set; }
|
||||
|
||||
@@ -12,9 +12,6 @@ public class ShopDrumrollScrollItem : MonoBehaviour
|
||||
[SerializeField]
|
||||
private GameObject _objPrerelease;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _objBadge;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_ = _objNewMark != null;
|
||||
|
||||
@@ -17,13 +17,6 @@ public static class UIUtil
|
||||
return _tempStringBuilder;
|
||||
}
|
||||
|
||||
public static void SetPositionY(Transform targetTransform, float y)
|
||||
{
|
||||
Vector2 vector = targetTransform.localPosition;
|
||||
vector.y = y;
|
||||
targetTransform.localPosition = vector;
|
||||
}
|
||||
|
||||
public static void AddPositionY(Transform targetTransform, float addY)
|
||||
{
|
||||
Vector2 vector = targetTransform.localPosition;
|
||||
|
||||
Reference in New Issue
Block a user