cull(engine-cleanup): pass-8 phase-2 cascade round 1 after GachaUI stub

This commit is contained in:
gamer147
2026-07-03 22:25:44 -04:00
parent a0533bf2e3
commit e3b8b8dc0c
69 changed files with 4 additions and 6301 deletions

View File

@@ -1,34 +0,0 @@
using System;
using UnityEngine;
using Cute;
using Wizard;
// PASS-8/Phase-1 STUB: 1,055-line card-pack-open animation controller. Held as
// `GachaUI._cardPackManager` field but never constructed anywhere. Nested type
// `GachaMaskDark` is referenced from Wizard/Master.cs (`Dictionary<int, CardPackManager.
// GachaMaskDark> GachaMaskDarkDic`) — kept as-is (CSV parser for pack mask data;
// small and self-contained). Everything else stripped.
public class CardPackManager : MonoBehaviour
{
public bool IsSkipped { get; private set; }
public void Init(bool isAutoOpen, CardDetailUI cardDetail, UIManager.ViewScene nextScene, bool isCoutainSpecialCard, Action callback) { }
public void StartInstantiateCardPack(PackConfig packConfig) { }
public class GachaMaskDark
{
public int PackId;
public Rect UvRect;
public Color Color;
public GachaMaskDark(string[] columns)
{
int num = 0;
PackId = int.Parse(columns[num]);
num++;
UvRect = new Rect(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3]));
num += 4;
Color = new Color(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3]));
}
}
}

View File

@@ -366,18 +366,6 @@ public class DialogBase : MonoBehaviour
public UIScrollView ScrollView => scrollView; public UIScrollView ScrollView => scrollView;
public GameObject Btn1GameObject
{
get
{
if (button1 != null)
{
return button1.gameObject;
}
return null;
}
}
public int OpenSe { get; set; } public int OpenSe { get; set; }
public int CloseSe { get; set; } public int CloseSe { get; set; }
@@ -1044,16 +1032,6 @@ public class DialogBase : MonoBehaviour
} }
} }
public void SetDepthAndSortingOrder(int depth, int sortingOrder)
{
UIPanel component = GetComponent<UIPanel>();
UIPanel component2 = backView.GetComponent<UIPanel>();
component.depth = depth;
component2.depth = depth - 1;
component.sortingOrder = sortingOrder;
component2.sortingOrder = sortingOrder;
}
public void SetPanelSortingOrder(int order) public void SetPanelSortingOrder(int order)
{ {
GetComponent<UIPanel>().sortingOrder = order; GetComponent<UIPanel>().sortingOrder = order;

View File

@@ -7,19 +7,7 @@ public class GachaUI : UIBase
public enum CardPackType public enum CardPackType
{ {
NONE, NONE,
CRYSTAL_MULTI,
DAILY,
TICKET,
TICKET_MULTI, TICKET_MULTI,
RUPY,
RUPY_MULTI,
CRYSTAL_SPECIAL,
CRYSTAL_SELECT_SKIN,
FREE_PACKS, FREE_PACKS,
FREE_PACK_WITH_SKIN, FREE_PACK_WITH_SKIN }
ROTATION_STARTER_PACK,
CRYSTAL_ACQUIRE_SKIN_CARD_PACK
}
public static bool IsTsStepupPackId(int packId) => false;
} }

View File

@@ -21,8 +21,6 @@ public class MyPageMenu : UIBase
public static DialogBase CreateDialogForTutorial() => null; public static DialogBase CreateDialogForTutorial() => null;
public void ChangeMenu(int index, bool isCutCardMotion = false) { } public void ChangeMenu(int index, bool isCutCardMotion = false) { }
public void FinishTutorialMode() { }
public void ResetFirstGuide() { }
public void OnReadGift() { } public void OnReadGift() { }
public void SetGuideEffect(Transform parent, Vector3 localPosition, float rotation) { } public void SetGuideEffect(Transform parent, Vector3 localPosition, float rotation) { }
public void SetGuideToOkOnlyDialog(DialogBase dialog) { } public void SetGuideToOkOnlyDialog(DialogBase dialog) { }

View File

@@ -1,32 +0,0 @@
using UnityEngine;
public class RepeatTimer : Timer
{
private float interval;
public RepeatTimer(float time, OnEndDelegate onEndEvent)
: base(time, onEndEvent)
{
interval = time;
}
public override void Update()
{
if (!base.IsEnd)
{
RemainTimeSec -= Time.deltaTime;
if (!(RemainTimeSec > 0f))
{
base.IsEnd = true;
OnFinish();
}
}
}
private void OnFinish()
{
CallEvent();
RemainTimeSec = interval;
base.IsEnd = false;
}
}

View File

@@ -19,19 +19,6 @@ public class Timer
IsEnd = false; IsEnd = false;
} }
public virtual void Update()
{
if (!IsEnd)
{
RemainTimeSec -= Time.deltaTime;
if (!(RemainTimeSec > 0f))
{
IsEnd = true;
CallEvent();
}
}
}
public void CallEvent() public void CallEvent()
{ {
this.onEndEvent(); this.onEndEvent();

View File

@@ -1,35 +0,0 @@
using System.Collections.Generic;
using System.Linq;
public class TimerMgr
{
private IList<Timer> timerList = new List<Timer>();
public void Dispose()
{
timerList.Clear();
}
public void Update()
{
for (int num = timerList.Count - 1; num >= 0; num--)
{
Timer timer = timerList[num];
timer.Update();
if (timer.IsEnd)
{
timerList.RemoveAt(num);
}
}
}
public void Add(Timer timer)
{
timerList.Add(timer);
}
public void Remove(Timer timer)
{
timerList.Remove(timer);
}
}

View File

@@ -317,8 +317,6 @@ public class UIBase_CardManager : MonoBehaviour
private long SleeveId = 3000011L; private long SleeveId = 3000011L;
public bool isAssetAllReady;
private CardKeyWordCommonCache _keyWordCommonCache; private CardKeyWordCommonCache _keyWordCommonCache;
private CardKeyWordCache _keyWordCache; private CardKeyWordCache _keyWordCache;
@@ -329,11 +327,6 @@ public class UIBase_CardManager : MonoBehaviour
public _3dCardFrameManager _3dCardFrameManager { get; private set; } = new _3dCardFrameManager(); public _3dCardFrameManager _3dCardFrameManager { get; private set; } = new _3dCardFrameManager();
public bool getCreateEndFlag()
{
return CreateEndFlag;
}
public List<string> AddAssetPath(List<int> List, bool is2D, CardMaster.CardMasterId cardMasterId, bool isAddSleeve = true, long sleeveId = 3000011L) public List<string> AddAssetPath(List<int> List, bool is2D, CardMaster.CardMasterId cardMasterId, bool isAddSleeve = true, long sleeveId = 3000011L)
{ {
List<string> list = new List<string>(); List<string> list = new List<string>();

View File

@@ -1,51 +0,0 @@
using System.Collections.Generic;
using LitJson;
namespace Wizard.Scripts.Network.Data.TaskData.SpotCardExchange;
public class GachaPointExchangeInfoTask : BaseTask
{
public class GachaPointExchangeInfoTaskParam : BaseParam
{
public int odds_gacha_id;
public int parent_gacha_id;
}
public Dictionary<CardBasePrm.ClanType, List<GachaPointExchangeInfo>> ExchangeableRewardListInClassDict { get; private set; }
public GachaPointExchangeInfoTask()
{
base.type = ApiType.Type.GachaPointInfo;
}
public void SetParameter(int oddsGachaId, int gachaPointPackId)
{
GachaPointExchangeInfoTaskParam gachaPointExchangeInfoTaskParam = new GachaPointExchangeInfoTaskParam();
gachaPointExchangeInfoTaskParam.odds_gacha_id = oddsGachaId;
gachaPointExchangeInfoTaskParam.parent_gacha_id = gachaPointPackId;
base.Params = gachaPointExchangeInfoTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
JsonData jsonData = base.ResponseData["data"];
ExchangeableRewardListInClassDict = new Dictionary<CardBasePrm.ClanType, List<GachaPointExchangeInfo>>();
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.ALL; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
ExchangeableRewardListInClassDict[clanType] = new List<GachaPointExchangeInfo>();
}
JsonData jsonData2 = jsonData["gacha_point_rewards"];
for (int i = 0; i < jsonData2.Count; i++)
{
GachaPointExchangeInfo gachaPointExchangeInfo = new GachaPointExchangeInfo(jsonData2[i]);
ExchangeableRewardListInClassDict[gachaPointExchangeInfo.Class].Add(gachaPointExchangeInfo);
}
return num;
}
}

View File

@@ -1,38 +0,0 @@
namespace Wizard.Scripts.Network.Data.TaskData.SpotCardExchange;
public class GachaPointExchangeTask : BaseTask
{
public class GachaPointExchangeTaskParam : BaseParam
{
public int card_id;
public int parent_gacha_id;
public int odds_gacha_id;
}
public GachaPointExchangeTask()
{
base.type = ApiType.Type.GachaPointExchange;
}
public void SetParameter(int cardId, int parentGachaId, int oddsId)
{
GachaPointExchangeTaskParam gachaPointExchangeTaskParam = new GachaPointExchangeTaskParam();
gachaPointExchangeTaskParam.card_id = cardId;
gachaPointExchangeTaskParam.parent_gacha_id = parentGachaId;
gachaPointExchangeTaskParam.odds_gacha_id = oddsId;
base.Params = gachaPointExchangeTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]);
return num;
}
}

View File

@@ -1,103 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public class BannerDialog : MonoBehaviour
{
[SerializeField]
private UICenterOnChild _uiCenterOnChild;
[SerializeField]
private int _widthContentSize = 830;
[SerializeField]
private UITexture _bannerObj_1;
[SerializeField]
private UITexture _bannerObj_2;
[SerializeField]
private BoxCollider _leftButton;
[SerializeField]
private BoxCollider _rightButton;
[SerializeField]
private UIToggle indicatorBase;
private UITexture _currentBannerObj;
private int _currentTextureIndex;
private List<Texture> _listBannerTexture;
private List<UIToggle> _indicatorList = new List<UIToggle>();
private bool _isAnimation;
private List<string> _bannerTitleList;
private DialogBase _dialog;
private bool _isCreateEnd;
public void Init(List<Texture> bannerTextureList, List<string> bannerTitleList, DialogBase dialog)
{
_listBannerTexture = bannerTextureList;
_currentTextureIndex = 0;
_currentBannerObj = _bannerObj_1;
_bannerTitleList = bannerTitleList;
_dialog = dialog;
_uiCenterOnChild.onFinished = _OnFinishedCenterChild;
_bannerObj_1.transform.localPosition = Vector3.zero;
_bannerObj_2.transform.localPosition = new Vector3(_widthContentSize, 0f, 0f);
GameObject gameObject = indicatorBase.transform.parent.gameObject;
if (_listBannerTexture.Count <= 1)
{
gameObject.SetActive(value: false);
_rightButton.gameObject.SetActive(value: false);
_leftButton.gameObject.SetActive(value: false);
_bannerObj_2.gameObject.SetActive(value: false);
}
else
{
gameObject.SetActive(value: true);
_rightButton.gameObject.SetActive(value: true);
_leftButton.gameObject.SetActive(value: true);
_indicatorList.Add(indicatorBase);
for (int i = 1; i < _listBannerTexture.Count; i++)
{
_indicatorList.Add(NGUITools.AddChild(gameObject, indicatorBase.gameObject).GetComponent<UIToggle>());
}
gameObject.GetComponent<UIGrid>().Reposition();
UpdateIndicator(_currentTextureIndex);
}
_bannerObj_1.mainTexture = _listBannerTexture[_currentTextureIndex];
UpdateDialogTitle(_currentTextureIndex);
_isCreateEnd = true;
}
private void _OnFinishedCenterChild()
{
_isAnimation = false;
}
private void UpdateDialogTitle(int index)
{
if (_dialog != null && _bannerTitleList != null)
{
_dialog.SetTitleLabel(_bannerTitleList[index]);
}
}
private void UpdateIndicator(int index)
{
if (_indicatorList.Count > 1)
{
_indicatorList[index].value = true;
}
}
}

View File

@@ -63,24 +63,4 @@ public static class DialogCreator
dialogBase.SetObj(NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/DeckList/StageSelect"))); dialogBase.SetObj(NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/DeckList/StageSelect")));
return dialogBase; return dialogBase;
} }
public static void ShowCpAppliedDialog(LotteryApplyData lotteryData, Action onFinish)
{
if (!lotteryData.IsEnable)
{
onFinish.Call();
return;
}
UIManager.GetInstance().LoadingViewManager.CreateInSceneCenter();
string path = LotteryApplyDialog.GetLotteryTexturePath(lotteryData, isFetch: false);
UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(path, delegate
{
UIManager.GetInstance().closeInSceneCenterLoading();
LotteryApplyDialog.Create(lotteryData, autoClose: false).OnClose = delegate
{
onFinish.Call();
Toolbox.ResourcesManager.RemoveAsset(path);
};
}));
}
} }

View File

@@ -1,16 +0,0 @@
using UnityEngine;
namespace Wizard;
public class DialogSubText : MonoBehaviour
{
[SerializeField]
private UILabel _labelSubText;
public UILabel LabelSubText => _labelSubText;
public void SetSubText(string text)
{
_labelSubText.text = text;
}
}

View File

@@ -1,22 +0,0 @@
using UnityEngine;
namespace Wizard;
public class ExchangeConfirmDialog : MonoBehaviour
{
[SerializeField]
private UILabel _exchangeConfirmLabelMainFirst;
[SerializeField]
private UILabel _exchangeConfirmLabelMainSecond;
[SerializeField]
private UILabel _exchangeConfirmLabelSub;
public void SetText(string mainTextFirst, string mainTextSecond, string subText)
{
_exchangeConfirmLabelMainFirst.text = mainTextFirst;
_exchangeConfirmLabelMainSecond.text = mainTextSecond;
_exchangeConfirmLabelSub.text = subText;
}
}

View File

@@ -12,15 +12,12 @@ public class FirstTips : MonoBehaviour
{ {
Deck = 0, Deck = 0,
Battle = 4, Battle = 4,
ShopCardPack = 10,
ColosseumInfo = 17, ColosseumInfo = 17,
GachaPointExchange = 24,
Quest = 25, Quest = 25,
AdditionalPuzzle = 26, AdditionalPuzzle = 26,
Crossover = 28, Crossover = 28,
MyRotationDeck = 33, MyRotationDeck = 33,
BossRush = 34, BossRush = 34,
TimeslipResurgentCard = 42,
Max = 46, Max = 46,
MyPage = 1001 } MyPage = 1001 }
@@ -54,16 +51,6 @@ public class FirstTips : MonoBehaviour
return true; return true;
} }
public static void SaveFinishFirstTips(TipsType tips)
{
if (!IsAllwaysDispaly(tips))
{
long value = long.Parse(PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.FIRST_TIPS));
value = Fix(value);
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.FIRST_TIPS, (value | (1L << (int)tips)).ToString());
}
}
public static long Fix(long value) public static long Fix(long value)
{ {
if (value < 0) if (value < 0)

View File

@@ -198,11 +198,6 @@ public class Footer : UIBase
} }
} }
public void SetButtonEnable(int index, bool isEnable)
{
underButtons[index].isEnabled = isEnable;
}
public void InviteIconDisp(bool inDisp) public void InviteIconDisp(bool inDisp)
{ {
InviteIcon.SetActive(inDisp); InviteIcon.SetActive(inDisp);
@@ -303,12 +298,6 @@ public class Footer : UIBase
} }
} }
public void SetShopBadgeIconVisible(bool visible)
{
Data.MyPageNotifications.data.ShopNotification.AppealCardPack.NeedsFooterBadgeIcon = visible;
UpdateShopBadgeIcon();
}
public void OverwriteLabelColors(eColorCodeId gradientTopColorId, eColorCodeId gradientBottomColorId, eColorCodeId effectColorId) public void OverwriteLabelColors(eColorCodeId gradientTopColorId, eColorCodeId gradientBottomColorId, eColorCodeId effectColorId)
{ {
OverwriteLabelGradients(gradientTopColorId, gradientBottomColorId); OverwriteLabelGradients(gradientTopColorId, gradientBottomColorId);

View File

@@ -1,93 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaLayoutEffect : MonoBehaviour
{
[SerializeField]
private GameObject _effectRoot;
[SerializeField]
private UITexture _maskTexture;
private bool _isCompleteSetup;
private bool _isChangingPack;
private GameObject _effectObj;
public void Setup(string effectName, int stencil, List<string> resourceList)
{
if (!_isChangingPack)
{
_isChangingPack = true;
if (_isCompleteSetup)
{
Object.Destroy(_effectObj);
_effectObj = null;
_isCompleteSetup = false;
}
if (stencil > 0)
{
SetupStencilMaskMaterial(stencil);
}
UIManager.GetInstance().StartCoroutine(SetupEffect(effectName, stencil, resourceList));
}
}
private void SetupStencilMaskMaterial(int stencil)
{
_maskTexture.material = MaterialDefine.CreateNguiStencilMaskMaterial(stencil);
}
private IEnumerator SetupEffect(string effectName, int stencil, List<string> resourceList)
{
bool isCompleteMaterialSet = false;
List<string> effectAssets = new List<string> { Toolbox.ResourcesManager.GetAssetTypePath(effectName, ResourcesManager.AssetLoadPathType.Effect2D) };
yield return Toolbox.ResourcesManager.LoadAssetGroup(effectAssets, delegate
{
resourceList.AddRange(effectAssets);
});
_effectObj = EffectUtility.CreateEffect2D(new Effect2dCreateParam
{
Parent = _effectRoot,
EffectName = effectName,
ColorCode = null,
InitActive = false,
MaterialSetEndCallback = delegate
{
isCompleteMaterialSet = true;
},
UnloadAssetList = resourceList
});
while (!isCompleteMaterialSet)
{
yield return null;
}
_effectObj.SetActive(value: true);
if (stencil > 0)
{
ParticleSystemRenderer[] componentsInChildren = _effectObj.GetComponentsInChildren<ParticleSystemRenderer>();
foreach (ParticleSystemRenderer obj in componentsInChildren)
{
obj.sortingOrder = 1;
obj.material = new Material(obj.material);
}
/* Pre-Phase-5b: ChangeMaskShader dropped */
}
float num2 = 1f / _effectObj.transform.localScale.x;
Transform[] componentsInChildren2 = _effectObj.GetComponentsInChildren<Transform>();
foreach (Transform obj2 in componentsInChildren2)
{
Vector3 localPosition = obj2.localPosition;
localPosition *= num2;
obj2.localPosition = localPosition;
}
_effectObj.SetLayer(base.gameObject.layer, isSetChildren: true);
_isCompleteSetup = true;
_isChangingPack = false;
}
}

View File

@@ -1,252 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaLayoutPurchaseButton : MonoBehaviour
{
[SerializeField]
private GameObject _layoutRoot;
[SerializeField]
private UIButton _purchaseButton;
[SerializeField]
private UILabel _buyCostLabel;
[SerializeField]
private UILabel _haveItemLabel;
[SerializeField]
private GameObject _purchasedRoot;
[SerializeField]
private UILabel _purchasedLabel;
[SerializeField]
private GameObject _remainLabelRoot;
[SerializeField]
private GameObject _freePackLeaderSkinObj;
[SerializeField]
private GameObject _ribbon;
[SerializeField]
private GameObject _ribbonIcon;
[SerializeField]
private UILabel _ribbonLabel;
[SerializeField]
private GameObject _remainCountRoot;
[SerializeField]
private UILabel _freePackApealText;
[SerializeField]
private UILabel _inButtonLabel;
[SerializeField]
private UISprite _frame;
public Vector3 LayoutLocalPosition
{
get
{
return _layoutRoot.transform.localPosition;
}
set
{
_layoutRoot.transform.localPosition = value;
}
}
public Transform PurchaseButtonTransform => _purchaseButton.transform;
public void SetActiveLayout(bool isActive)
{
_layoutRoot.SetActive(isActive);
}
public void SetActivePurchaseButton(bool isActive)
{
_purchaseButton.gameObject.SetActive(isActive);
}
public void SetPurchasedMode(bool isPurchased)
{
SetPurchasedVisible(isPurchased);
SetActivePurchaseButton(!isPurchased);
}
public void SetOnClickPurchaseButton(Action onClick)
{
_purchaseButton.onClick.Clear();
_purchaseButton.onClick.Add(new EventDelegate(delegate
{
onClick.Call();
}));
}
public void SetToGrayPurchaseButton(bool isDisable)
{
UIManager.SetObjectToGrey(_purchaseButton.gameObject, isDisable);
}
public void SetBuyCostLabel(int cost, string staticTextId = null)
{
if (!(_buyCostLabel == null))
{
string text = cost.ToString();
if (!string.IsNullOrEmpty(staticTextId))
{
text = Data.SystemText.Get(staticTextId, text);
}
_buyCostLabel.text = text;
}
}
public void SetHaveItemLabel(int itemNum)
{
if (!(_haveItemLabel == null))
{
_haveItemLabel.text = itemNum.ToString();
}
}
public void SetPurchasedVisible(bool visible)
{
if (!(_purchasedRoot == null))
{
_purchasedRoot.SetActive(visible);
}
}
public void SetPurchasedLabel(string textId)
{
if (!(_purchasedLabel == null))
{
_purchasedLabel.text = Data.SystemText.Get(textId);
}
}
public void SetRemainLabelVisible(bool visible)
{
if (!(_remainLabelRoot == null))
{
_remainLabelRoot.SetActive(visible);
}
}
public void SetFreePackLeaderSkinVisible(bool visible)
{
if (!(_freePackLeaderSkinObj == null))
{
_freePackLeaderSkinObj.SetActive(visible);
}
}
public void SetFreePackLeaderSkinText(string text)
{
if (_freePackLeaderSkinObj != null)
{
_freePackLeaderSkinObj.GetComponent<UILabel>().text = text;
}
}
public void SetRibbonActive(bool active)
{
if (_ribbon != null)
{
_ribbon.SetActive(active);
}
}
public void SetPinkRibbon(bool isPink)
{
if (_ribbon != null)
{
if (isPink)
{
_ribbon.GetComponent<UISprite>().spriteName = "campaign_title_04";
}
else
{
_ribbon.GetComponent<UISprite>().spriteName = "campaign_title_02";
}
}
}
public void SetIconActive(bool active, string iconSprite)
{
if (_ribbonIcon != null)
{
_ribbonIcon.GetComponent<UISprite>().spriteName = iconSprite;
_ribbonIcon.SetActive(active);
if (_ribbonLabel != null)
{
float x = (active ? 26.3f : 5f);
int width = (active ? 167 : 203);
Vector3 localPosition = _ribbonLabel.gameObject.transform.localPosition;
localPosition.x = x;
_ribbonLabel.gameObject.transform.localPosition = localPosition;
_ribbonLabel.width = width;
}
}
}
public void SetWinterSprite(bool active)
{
if (active)
{
if (_ribbon != null)
{
_ribbon.GetComponent<UISprite>().spriteName = "campaign_title_02_winter";
}
if (_purchaseButton != null)
{
_purchaseButton.normalSprite = "btn_free_pack_off_winter";
_purchaseButton.hoverSprite = "btn_free_pack_off_winter";
_purchaseButton.pressedSprite = "btn_free_pack_on_winter";
}
if (_frame != null)
{
_frame.spriteName = "frame_12_winter";
}
}
}
public void SetRemainCountRootVisible(bool visible)
{
if (_remainCountRoot != null)
{
_remainCountRoot.SetActive(visible);
}
}
public void SetFreePackApealTextVisible(bool visible)
{
if (_freePackApealText != null)
{
_freePackApealText.gameObject.SetActive(visible);
}
}
public void SetFreePackApealText(string text)
{
if (_freePackApealText != null)
{
_freePackApealText.text = text;
}
}
public void SetInButtonText(string text)
{
if (_inButtonLabel != null)
{
_inButtonLabel.text = text;
}
}
}

View File

@@ -1,864 +0,0 @@
using System;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaPackAreaLayout : MonoBehaviour
{
private readonly Vector3 DEFAULT_PACK_TICKET_POSITION = new Vector3(7f, 40.6f, 0f);
private readonly Vector3 LEGEND_PACK_TICKET_POSITION = new Vector3(7f, -179.6f, 0f);
[SerializeField]
private UITexture _packTitleTexture;
[SerializeField]
private UIButton _rateButton;
[SerializeField]
private UITexture _packPosterTexture;
[SerializeField]
private UITexture _packPosterLegendPack;
[SerializeField]
private UILabel _labelPackDescription;
[SerializeField]
private UILabel _labelSpecialPackDescription;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseTicketButton;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseRupyButton;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseCrystalButton;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseDailyButton;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseFree10PacksButton;
[SerializeField]
private GachaLayoutPurchaseButton _layoutPurchaseStepupButton;
[SerializeField]
private GachaLayoutEffect _free10PackEffect;
[SerializeField]
private CenteringUIWidget _free10PackCentering;
[SerializeField]
private UITexture _headLineTicketTexture;
[SerializeField]
private GameObject _objPrereleaseLayoutRoot;
[SerializeField]
private GameObject _noLimitPrereleaseRoot;
[SerializeField]
private UIButton _btnPrereleasePurchaseRewards;
[SerializeField]
private UILabel _labelPrereleaseRemainTime;
[SerializeField]
private UILabel _labelPrereleasePurchaseCount;
[SerializeField]
private GameObject _prereleaseRemainTimeRoot;
[SerializeField]
private GachaPackPointLayout _packPointLayout;
[SerializeField]
private UIButton _btnSpecialPackReward;
[SerializeField]
private BannerDialog _prefabDialogPackBanner;
[SerializeField]
private GameObject _objUnrestrictedPrereleaseLayoutRoot;
[SerializeField]
private UIButton _btnUnrestrictedPrereleasePurchaseRewards;
[SerializeField]
private UILabel _labelUnrestrictedPrereleaseRemainTime;
[SerializeField]
private UILabel _labelUnrestrictedPrereleasePurchaseCount;
[SerializeField]
private UITexture _bonusPosterTexture;
[SerializeField]
private GameObject _preReleasePointRoot;
[SerializeField]
private UIGauge _preReleasePointGauge;
[SerializeField]
private UILabel _preReleasePointLabel;
[SerializeField]
private GameObject _appealImage;
[SerializeField]
private UITexture _appealTexture;
private DialogBase _dialogPackBanner;
private CardDetailUI _cardDetail;
private TimerMgr _timerManager;
private RepeatTimer _currentTimer;
private Action<PackConfig, PackChildGachaInfo> _onClickPurchaseButton;
private Action<PackConfig> _onClickExchangePackPoint;
private List<string> _packBannerResources = new List<string>();
public void SetTimer(TimerMgr timer)
{
_timerManager = timer;
}
public void SetCardDetailDialog(CardDetailUI cardDetail)
{
_cardDetail = cardDetail;
}
public void SetOnClickPurchaseButton(Action<PackConfig, PackChildGachaInfo> onClickPurchase)
{
_onClickPurchaseButton = onClickPurchase;
}
public void SetOnClickExchangePackPoint(Action<PackConfig> onClickExchange)
{
_onClickExchangePackPoint = onClickExchange;
}
public void SetToGrayRateButton(bool isGary)
{
UIManager.SetObjectToGrey(_rateButton.gameObject, isGary);
}
public void SetTutorialTicketPurchasebutton()
{
MyPageMenu.Instance.SetGuideEffect(_layoutPurchaseTicketButton.PurchaseButtonTransform, Vector3.zero, -45f);
}
public void UpdateRupyCount(int rupyCount)
{
_layoutPurchaseRupyButton.SetHaveItemLabel(rupyCount);
}
public void UpdateCrystalCount(int crystalCount)
{
_layoutPurchaseCrystalButton.SetHaveItemLabel(crystalCount);
}
public void ShowPackLayout(PackConfig packConfig, List<string> resourceList)
{
HidePackLayoutObject(packConfig.IsUseLongPoster);
SetPackLayoutTexture(packConfig);
SetEventPackInfo(packConfig);
if (packConfig.IsPrerelease)
{
ShowPrereleaseLayout(packConfig);
return;
}
if (packConfig.IsLegendCardPack)
{
ShowLegendLayout(packConfig, resourceList);
return;
}
if (packConfig.IsSpecialCardPack)
{
ShowSpecialLayout(packConfig);
return;
}
if (packConfig.IsRotationStarterCardPack)
{
ShowRotationStarterLayout(packConfig, resourceList);
return;
}
ShowStandardLayout(packConfig, resourceList);
if (packConfig.IsNeedRemainTime)
{
UpdateDetailString(packConfig);
}
if (packConfig.IsShowAppealImage)
{
_appealImage.SetActive(value: true);
ResourcesManager resourcesManager = Toolbox.ResourcesManager;
string path = $"card_pack_{packConfig.PackId}_poster_sub";
string assetTypePath = resourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isfetch: true);
_appealTexture.mainTexture = resourcesManager.LoadObject(assetTypePath) as Texture;
}
}
private void HidePackLayoutObject(bool isLongPoster)
{
_labelPackDescription.gameObject.SetActive(value: false);
_labelSpecialPackDescription.gameObject.SetActive(value: false);
_packPosterTexture.gameObject.SetActive(!isLongPoster);
_packPosterLegendPack.gameObject.SetActive(isLongPoster);
_layoutPurchaseRupyButton.SetActiveLayout(isActive: false);
_layoutPurchaseTicketButton.SetActiveLayout(isActive: false);
_layoutPurchaseDailyButton.SetActivePurchaseButton(isActive: false);
_layoutPurchaseDailyButton.SetRibbonActive(active: false);
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: false);
_layoutPurchaseCrystalButton.SetRibbonActive(active: false);
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: false);
_layoutPurchaseFree10PacksButton.SetIconActive(active: false, string.Empty);
_layoutPurchaseFree10PacksButton.SetRemainCountRootVisible(visible: true);
_layoutPurchaseFree10PacksButton.SetFreePackApealTextVisible(visible: false);
_layoutPurchaseStepupButton.SetActivePurchaseButton(isActive: false);
_bonusPosterTexture.gameObject.SetActive(value: false);
_layoutPurchaseCrystalButton.SetPurchasedVisible(visible: false);
_layoutPurchaseRupyButton.SetPurchasedVisible(visible: false);
_layoutPurchaseTicketButton.SetPurchasedVisible(visible: false);
_layoutPurchaseCrystalButton.SetPurchasedLabel("Shop_0100");
_layoutPurchaseRupyButton.SetPurchasedLabel("Shop_0100");
_layoutPurchaseTicketButton.SetPurchasedLabel("Shop_0100");
_objPrereleaseLayoutRoot.SetActive(value: false);
_objUnrestrictedPrereleaseLayoutRoot.SetActive(value: false);
_preReleasePointRoot.SetActive(value: false);
_packPointLayout.SetActivePackPointLayout(isActive: false);
_btnSpecialPackReward.gameObject.SetActive(value: false);
_appealImage.SetActive(value: false);
}
private void SetEventPackInfo(PackConfig packConfig)
{
_rateButton.onClick.Clear();
_rateButton.onClick.Add(new EventDelegate(delegate
{
OnBtnShowGachaRate(packConfig);
}));
UIEventListener.Get(_labelSpecialPackDescription.gameObject).onClick = delegate
{
OpenPackBannerDialog(packConfig);
};
if (_currentTimer != null)
{
_timerManager.Remove(_currentTimer);
}
UIEventListener.Get(_packPosterLegendPack.gameObject).onClick = delegate
{
OpenPackBannerDialog(packConfig);
};
UIEventListener.Get(_packPosterTexture.gameObject).onClick = delegate
{
OpenPackBannerDialog(packConfig);
};
}
private void SetPackLayoutTexture(PackConfig packConfig)
{
ResourcesManager resourcesManager = Toolbox.ResourcesManager;
if (packConfig.IsSpecialLayout || packConfig.IsPrerelease)
{
if (packConfig.IsUseLongPoster)
{
_packPosterLegendPack.mainTexture = resourcesManager.LoadObject(packConfig.GetPackPosterTexturePath(isFetch: true)) as Texture;
}
else
{
_packPosterTexture.mainTexture = resourcesManager.LoadObject(packConfig.GetPackPosterTexturePath(isFetch: true)) as Texture;
_bonusPosterTexture.mainTexture = resourcesManager.LoadObject(packConfig.GetPackBounsPosterTexturePath(isFetch: true)) as Texture;
_bonusPosterTexture.gameObject.SetActive(value: true);
}
}
else
{
_packPosterTexture.mainTexture = resourcesManager.LoadObject(packConfig.GetPackPosterTexturePath(isFetch: true)) as Texture;
}
_packTitleTexture.mainTexture = resourcesManager.LoadObject(packConfig.GetPackTitleLogoTexturePath(isFetch: true)) as Texture;
if (!packConfig.IsSpecialCardPack)
{
_headLineTicketTexture.mainTexture = resourcesManager.LoadObject(packConfig.GetPackIconTexturePath(isFetch: true)) as Texture;
}
}
private void OpenPackBannerDialog(PackConfig packConfig)
{
List<string> packBannerResources = GetPackBannerResources(packConfig);
if (packBannerResources.Count > 0)
{
UIManager.GetInstance().createInSceneCenterLoading();
Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(packBannerResources, delegate
{
CreatePackBannerDialog(packConfig);
UIManager.GetInstance().closeInSceneCenterLoading();
});
}
else
{
CreatePackBannerDialog(packConfig);
}
}
private List<string> GetPackBannerResources(PackConfig packConfig)
{
ResourcesManager resourcesManager = Toolbox.ResourcesManager;
List<PackBannerData> listPackBanner = packConfig.ListPackBanner;
List<string> list = new List<string>();
for (int i = 0; i < listPackBanner.Count; i++)
{
string assetTypePath = resourcesManager.GetAssetTypePath(listPackBanner[i].BannerFileName, ResourcesManager.AssetLoadPathType.ShopCardPack);
if (!_packBannerResources.Contains(assetTypePath))
{
list.Add(assetTypePath);
}
}
_packBannerResources.AddRange(list);
return list;
}
private void CreatePackBannerDialog(PackConfig packConfig)
{
List<PackBannerData> listPackBanner = packConfig.ListPackBanner;
if (listPackBanner.Count <= 0 || Data.Load.data._userTutorial.TutorialStep == 41 || _dialogPackBanner != null || packConfig.IsSpecialCardPack)
{
return;
}
List<string> list = new List<string>();
foreach (PackBannerData item in listPackBanner)
{
list.Add(item.BannerTitle);
}
_dialogPackBanner = UIManager.GetInstance().CreateDialogClose();
_dialogPackBanner.SetSize(DialogBase.Size.M);
_dialogPackBanner.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
_dialogPackBanner.SetPanelDepth(610);
BannerDialog bannerDialog = UnityEngine.Object.Instantiate(_prefabDialogPackBanner);
_dialogPackBanner.SetObj(bannerDialog.gameObject);
List<Texture> list2 = new List<Texture>();
for (int i = 0; i < listPackBanner.Count; i++)
{
list2.Add(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(listPackBanner[i].BannerFileName, ResourcesManager.AssetLoadPathType.ShopCardPack, isfetch: true)) as Texture);
}
bannerDialog.Init(list2, list, _dialogPackBanner);
}
public void ClearPackBannerResources()
{
Toolbox.ResourcesManager.RemoveAssetGroup(_packBannerResources);
_packBannerResources.Clear();
}
private void OnBtnShowGachaRate(PackConfig packConfig)
{
CheckTimeSlipRotationPeriodTask task = new CheckTimeSlipRotationPeriodTask();
StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate
{
UIManager.GetInstance().WebViewHelper.OpenGachaRateWebView(packConfig.PackId, (int)packConfig.Category);
}));
}
private void ShowPurchaseRewardDialog(List<PurchaseRewardInfo> purchaseRewardList)
{
_cardDetail.IsShowFlavorTextButton = false;
_cardDetail.IsShowVoiceButton = false;
_cardDetail.IsShowEvolutionButton = false;
DialogBase dialogBase = PurchaseRewardDialog.Create(purchaseRewardList, _cardDetail, useLargeDetailDialog: true, PurchaseRewardDialog.Layout.NORMAL, null, null, isPaging: true);
dialogBase.OnClose = (Action)Delegate.Combine(dialogBase.OnClose, (Action)delegate
{
_cardDetail.IsShowFlavorTextButton = true;
_cardDetail.IsShowVoiceButton = true;
_cardDetail.IsShowEvolutionButton = true;
});
dialogBase.SetLayer("MyPage");
dialogBase.SetDepthAndSortingOrder(140, 2);
}
private void ShowStandardLayout(PackConfig packConfig, List<string> resourceList)
{
SetStanderdInfoText(packConfig.Description);
bool flag = false;
for (int i = 0; i < packConfig.ChildGachaInfoList.Count; i++)
{
PackChildGachaInfo gachaInfo = packConfig.ChildGachaInfoList[i];
switch (gachaInfo.PackType)
{
case GachaUI.CardPackType.DAILY:
if (flag)
{
break;
}
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: true);
if (!gachaInfo.IsDailySingle)
{
_layoutPurchaseDailyButton.SetActivePurchaseButton(isActive: false);
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: true);
if (packConfig.GachaPointData != null && gachaInfo.OverrideIncreaseGachaPoint > packConfig.GachaPointData.IncreaseGachaPoint)
{
_layoutPurchaseCrystalButton.SetRibbonActive(active: true);
}
break;
}
_layoutPurchaseDailyButton.SetBuyCostLabel(gachaInfo.Cost);
_layoutPurchaseDailyButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseDailyButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseDailyButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: false);
if (packConfig.GachaPointData != null && gachaInfo.OverrideIncreaseGachaPoint > packConfig.GachaPointData.IncreaseGachaPoint)
{
_layoutPurchaseDailyButton.SetRibbonActive(active: true);
}
break;
case GachaUI.CardPackType.CRYSTAL_MULTI:
if (!flag)
{
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: true);
_layoutPurchaseCrystalButton.SetBuyCostLabel(gachaInfo.Cost, "Shop_0058");
_layoutPurchaseCrystalButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseCrystalButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
}
break;
case GachaUI.CardPackType.TICKET_MULTI:
_layoutPurchaseTicketButton.SetActiveLayout(isActive: true);
_layoutPurchaseTicketButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseTicketButton.LayoutLocalPosition = DEFAULT_PACK_TICKET_POSITION;
_layoutPurchaseTicketButton.SetHaveItemLabel(gachaInfo.CostGoodsCount);
_layoutPurchaseTicketButton.SetBuyCostLabel(gachaInfo.Cost, "Shop_0057");
if (gachaInfo.CostGoodsCount >= gachaInfo.Cost)
{
_layoutPurchaseTicketButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseTicketButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
}
else
{
_layoutPurchaseTicketButton.SetToGrayPurchaseButton(isDisable: true);
}
break;
case GachaUI.CardPackType.RUPY_MULTI:
_layoutPurchaseRupyButton.SetActiveLayout(isActive: true);
_layoutPurchaseRupyButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseRupyButton.SetBuyCostLabel(gachaInfo.Cost, "Shop_0059");
if (PlayerStaticData.UserRupyCount >= gachaInfo.Cost)
{
_layoutPurchaseRupyButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseRupyButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
}
else
{
_layoutPurchaseRupyButton.SetToGrayPurchaseButton(isDisable: true);
}
break;
case GachaUI.CardPackType.FREE_PACKS:
case GachaUI.CardPackType.FREE_PACK_WITH_SKIN:
{
flag = true;
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: false);
_layoutPurchaseDailyButton.SetActivePurchaseButton(isActive: false);
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: true);
_layoutPurchaseFree10PacksButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseFree10PacksButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseFree10PacksButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
_layoutPurchaseFree10PacksButton.SetHaveItemLabel(gachaInfo.AvailableCount / gachaInfo.PackCountBuyPer);
_layoutPurchaseFree10PacksButton.SetBuyCostLabel(gachaInfo.PackCountBuyPer, (gachaInfo.PackCountBuyPer == 1) ? "Shop_0222" : "Shop_0233");
bool flag2 = packConfig.Category == PackCategory.FreePackLeaderSkin || packConfig.Category == PackCategory.LeaderSkinPack || packConfig.Category == PackCategory.LegendAndLeaderSkinSinglePack;
_layoutPurchaseFree10PacksButton.SetRemainLabelVisible(!flag2);
_layoutPurchaseFree10PacksButton.SetFreePackLeaderSkinVisible(flag2);
if (packConfig.Category == PackCategory.LeaderSkinPack)
{
string freePackLeaderSkinText = Data.SystemText.Get("Shop_0251");
_layoutPurchaseFree10PacksButton.SetFreePackLeaderSkinText(freePackLeaderSkinText);
}
else if (packConfig.Category == PackCategory.LegendAndLeaderSkinSinglePack)
{
string freePackLeaderSkinText2 = Data.SystemText.Get("Shop_0252");
_layoutPurchaseFree10PacksButton.SetFreePackLeaderSkinText(freePackLeaderSkinText2);
}
_layoutPurchaseFree10PacksButton.SetIconActive(gachaInfo.IsShowAnniversaryIcon, gachaInfo.AnniversaryIconSpriteName);
_layoutPurchaseFree10PacksButton.SetPinkRibbon(gachaInfo.IsShowPinkRibbon);
_layoutPurchaseFree10PacksButton.SetWinterSprite(gachaInfo.IsShowWinterUI);
_free10PackCentering.Reposition();
_free10PackEffect.Setup("cmn_frame_glow_1", 0, resourceList);
break;
}
}
}
if (packConfig.IsUsePackPointLayout)
{
_packPointLayout.SetPackPointLayout(packConfig, delegate
{
_onClickExchangePackPoint(packConfig);
});
}
}
private void SetStanderdInfoText(string packDescription)
{
_labelPackDescription.gameObject.SetActive(value: true);
_labelPackDescription.text = packDescription;
}
private void ShowPrereleaseLayout(PackConfig packConfig)
{
PrereleasePurchaseInfo prereleasePurchaseInfo = packConfig.PrereleasePurchaseInfo;
_preReleasePointRoot.SetActive(value: true);
_ = packConfig.GachaPointData;
_preReleasePointGauge.Value = (float)prereleasePurchaseInfo.PreReleasePointCurent / (float)prereleasePurchaseInfo.PreReleasePointLimit;
_preReleasePointLabel.text = prereleasePurchaseInfo.PreReleasePointCurent + "/" + prereleasePurchaseInfo.PreReleasePointLimit;
_noLimitPrereleaseRoot.SetActive(!prereleasePurchaseInfo.IsCountLimitedPrerelease);
if (prereleasePurchaseInfo.IsCountLimitedPrerelease)
{
_objPrereleaseLayoutRoot.SetActive(value: true);
}
else
{
_objUnrestrictedPrereleaseLayoutRoot.SetActive(value: true);
if (packConfig.IsUsePackPointLayout)
{
_packPointLayout.SetPackPointLayout(packConfig, delegate
{
_onClickExchangePackPoint(packConfig);
});
}
}
SetPrereleasePurchaseButton(packConfig, prereleasePurchaseInfo, packConfig.ChildGachaInfoList[0]);
SetPrereleasePurchaseRewards(prereleasePurchaseInfo);
SetPrereleaseInfoText(prereleasePurchaseInfo, packConfig.Description);
}
private void SetPrereleasePurchaseButton(PackConfig packConfig, PrereleasePurchaseInfo purchaseInfo, PackChildGachaInfo gachaInfo)
{
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: true);
_layoutPurchaseCrystalButton.SetBuyCostLabel(gachaInfo.Cost, "Shop_0058");
ShowStandardLayout(packConfig, null);
_layoutPurchaseCrystalButton.SetPurchasedLabel("Shop_0206");
_layoutPurchaseRupyButton.SetPurchasedLabel("Shop_0206");
_layoutPurchaseTicketButton.SetPurchasedLabel("Shop_0206");
if (purchaseInfo.TicketRupyCountRemain == 0)
{
_layoutPurchaseRupyButton.SetPurchasedMode(isPurchased: true);
_layoutPurchaseTicketButton.SetPurchasedMode(isPurchased: true);
}
else
{
_layoutPurchaseRupyButton.SetPurchasedMode(isPurchased: false);
_layoutPurchaseTicketButton.SetPurchasedMode(isPurchased: false);
}
if (!purchaseInfo.IsCountLimitedPrerelease || purchaseInfo.GetAbleBuyPackNum() > 0)
{
_layoutPurchaseCrystalButton.SetPurchasedMode(isPurchased: false);
_layoutPurchaseCrystalButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseCrystalButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
}
else
{
_layoutPurchaseCrystalButton.SetPurchasedMode(isPurchased: true);
}
}
private void SetPrereleasePurchaseRewards(PrereleasePurchaseInfo purchaseInfo)
{
UIButton uIButton = (purchaseInfo.IsCountLimitedPrerelease ? _btnPrereleasePurchaseRewards : _btnUnrestrictedPrereleasePurchaseRewards);
if (purchaseInfo.RewardsList.Count == 0)
{
uIButton.gameObject.SetActive(value: false);
return;
}
uIButton.onClick.Clear();
uIButton.onClick.Add(new EventDelegate(delegate
{
ShowPurchaseRewardDialog(purchaseInfo.RewardsList);
}));
}
private void SetPrereleaseInfoText(PrereleasePurchaseInfo purchaseInfo, string packDescription)
{
UILabel obj = (purchaseInfo.IsCountLimitedPrerelease ? _labelPrereleaseRemainTime : _labelUnrestrictedPrereleaseRemainTime);
UILabel uILabel = (purchaseInfo.IsCountLimitedPrerelease ? _labelPrereleasePurchaseCount : _labelUnrestrictedPrereleasePurchaseCount);
string showText = purchaseInfo.RemainTime.GetShowText("Shop_0179", "Shop_0178", "Shop_0177");
_labelPackDescription.gameObject.SetActive(value: true);
_labelPackDescription.text = packDescription.Replace("{remaining_purchase_time}", showText);
obj.text = purchaseInfo.RemainTime.GetShowText("Shop_0179", "Shop_0178", "Shop_0177");
if (purchaseInfo.IsCountLimitedPrerelease)
{
uILabel.text = Data.SystemText.Get("Shop_0181", purchaseInfo.CurrentCount.ToString(), purchaseInfo.LimitCount.ToString());
_prereleaseRemainTimeRoot.SetActive(value: false);
}
else
{
uILabel.text = Data.SystemText.Get("Shop_0046", purchaseInfo.CurrentCount.ToString());
}
}
private void ShowSpecialLayout(PackConfig packConfig)
{
UpdateDetailString(packConfig);
SetSpecialPurchaseButton(packConfig, packConfig.ChildGachaInfoList[0], packConfig.OpenCountLimit > packConfig.OpenCount);
SetSpecialPurchaseRewards(packConfig);
}
private static string ReplaceDetailString(PackConfig packConfig)
{
string description = packConfig.Description;
if (!packConfig.IsNeedRemainTime)
{
return description;
}
int second = packConfig.RemainTime.Second;
string newValue;
if (second < 3600)
{
int num = ((second > 0) ? (second / 60 + 1) : 0);
newValue = Data.SystemText.Get("Shop_0147", num.ToString());
}
else if (second < 86400)
{
int num2 = second / 3600;
newValue = Data.SystemText.Get("Shop_0146", num2.ToString());
}
else
{
int num3 = second / 86400;
newValue = Data.SystemText.Get("Shop_0145", num3.ToString());
}
description = description.Replace("{remaining_purchase_time}", newValue);
int num4 = (packConfig.OpenCountLimit - packConfig.OpenCount) / 10;
if (GachaUI.IsTsStepupPackId(packConfig.PackId))
{
num4 = packConfig.RemainStepupOpenCount;
}
return string.Format(description, num4);
}
private void UpdateDetailString(PackConfig packConfig)
{
if (_currentTimer != null)
{
_timerManager.Remove(_currentTimer);
}
RepeatTimer repeatTimer = new RepeatTimer((float)(60.0 - packConfig.RemainTime.NowUnixTime % 60.0), delegate
{
UpdateDetailString(packConfig);
});
_timerManager.Add(repeatTimer);
_currentTimer = repeatTimer;
if (packConfig.Category == PackCategory.LeaderSkinPack)
{
_labelPackDescription.gameObject.SetActive(value: true);
_labelSpecialPackDescription.gameObject.SetActive(value: false);
_labelPackDescription.text = ReplaceDetailString(packConfig);
}
else
{
_labelSpecialPackDescription.gameObject.SetActive(value: true);
_labelPackDescription.gameObject.SetActive(value: false);
_labelSpecialPackDescription.text = ReplaceDetailString(packConfig);
}
}
private void SetSpecialPurchaseButton(PackConfig packConfig, PackChildGachaInfo gachaInfo, bool isPurchasable)
{
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: true);
if (isPurchasable)
{
if (GachaUI.IsTsStepupPackId(packConfig.PackId))
{
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: false);
_layoutPurchaseStepupButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseStepupButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseStepupButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
int num = packConfig.TotalStepupOpenCount - packConfig.RemainStepupOpenCount + 1;
_layoutPurchaseStepupButton.SetInButtonText(Data.SystemText.Get("Shop_0186", num.ToString()));
}
else
{
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseCrystalButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseCrystalButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
_layoutPurchaseStepupButton.SetActivePurchaseButton(isActive: false);
}
}
else
{
_layoutPurchaseCrystalButton.SetPurchasedVisible(visible: true);
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: false);
_layoutPurchaseStepupButton.SetActivePurchaseButton(isActive: false);
}
int cost = gachaInfo.Cost * 10;
_layoutPurchaseCrystalButton.SetBuyCostLabel(cost, "Shop_0112");
}
private void SetSpecialPurchaseRewards(PackConfig packConfig)
{
if (packConfig.IsExistSpecialPackPurchaseRewards && packConfig.SpecialPackRewardsList.Count != 0)
{
_btnSpecialPackReward.gameObject.SetActive(value: true);
_btnSpecialPackReward.onClick.Clear();
_btnSpecialPackReward.onClick.Add(new EventDelegate(delegate
{
ShowPurchaseRewardDialog(packConfig.SpecialPackRewardsList);
}));
}
}
private void ShowLegendLayout(PackConfig packConfig, List<string> resourceList)
{
SetLegendInfoText(packConfig.Description);
PackChildGachaInfo packChildGachaInfo = packConfig.CanFreeBuyInfo();
if (packChildGachaInfo != null)
{
SetFreeLegendTicketButton(packConfig, packChildGachaInfo, resourceList);
}
else
{
SetLegendPurchaseButton(packConfig, packConfig.ChildGachaInfoList[0]);
}
}
private void SetLegendPurchaseButton(PackConfig packConfig, PackChildGachaInfo gachaInfo)
{
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: false);
_layoutPurchaseTicketButton.SetActiveLayout(isActive: true);
_layoutPurchaseTicketButton.SetPurchasedMode(isPurchased: false);
_layoutPurchaseTicketButton.LayoutLocalPosition = LEGEND_PACK_TICKET_POSITION;
_layoutPurchaseTicketButton.SetHaveItemLabel(gachaInfo.CostGoodsCount);
_layoutPurchaseTicketButton.SetBuyCostLabel(gachaInfo.Cost, "Shop_0057");
if (gachaInfo.CostGoodsCount >= gachaInfo.Cost)
{
_layoutPurchaseTicketButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseTicketButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
}
else
{
_layoutPurchaseTicketButton.SetToGrayPurchaseButton(isDisable: true);
}
}
private void SetFreeLegendTicketButton(PackConfig packConfig, PackChildGachaInfo gachaInfo, List<string> resourceList)
{
_layoutPurchaseTicketButton.SetActiveLayout(isActive: false);
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: true);
_layoutPurchaseFree10PacksButton.SetRemainCountRootVisible(visible: false);
_layoutPurchaseFree10PacksButton.SetPinkRibbon(gachaInfo.IsShowPinkRibbon);
_layoutPurchaseFree10PacksButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseFree10PacksButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseFree10PacksButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
_layoutPurchaseFree10PacksButton.SetFreePackLeaderSkinVisible(visible: false);
_layoutPurchaseFree10PacksButton.SetRemainLabelVisible(visible: true);
_layoutPurchaseFree10PacksButton.SetHaveItemLabel(gachaInfo.AvailableCount / gachaInfo.PackCountBuyPer);
_layoutPurchaseFree10PacksButton.SetBuyCostLabel(gachaInfo.PackCountBuyPer, (gachaInfo.PackCountBuyPer == 1) ? "Shop_0222" : "Shop_0233");
_layoutPurchaseFree10PacksButton.SetIconActive(gachaInfo.IsShowAnniversaryIcon, gachaInfo.AnniversaryIconSpriteName);
_free10PackCentering.Reposition();
_free10PackEffect.Setup("cmn_frame_glow_1", 0, resourceList);
}
private void SetLegendInfoText(string packDescription)
{
_labelSpecialPackDescription.gameObject.SetActive(value: true);
_labelSpecialPackDescription.text = packDescription;
}
private void ShowRotationStarterLayout(PackConfig packConfig, List<string> resourceList)
{
PackChildGachaInfo packChildGachaInfo = packConfig.CanFreeBuyInfo();
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: false);
_layoutPurchaseFree10PacksButton.SetPinkRibbon(packConfig.ChildGachaInfoList[0].IsShowPinkRibbon);
if (packChildGachaInfo == null)
{
SetRotationStarterButton(packConfig, packConfig.ChildGachaInfoList[0], packConfig.OpenCountLimit > packConfig.OpenCount);
}
else
{
SetFreeRotationStarter(packConfig, packChildGachaInfo, resourceList);
}
SetRotationStarterInfoText(packConfig);
}
private void SetRotationStarterInfoText(PackConfig packConfig)
{
_labelSpecialPackDescription.gameObject.SetActive(value: true);
int num = (packConfig.OpenCountLimit - packConfig.OpenCount) / 10;
_labelSpecialPackDescription.text = string.Format(packConfig.Description, num);
}
private void SetFreeRotationStarter(PackConfig packConfig, PackChildGachaInfo gachaInfo, List<string> resourceList)
{
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: false);
_layoutPurchaseFree10PacksButton.SetActiveLayout(isActive: true);
_layoutPurchaseFree10PacksButton.SetRemainCountRootVisible(visible: false);
_layoutPurchaseFree10PacksButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseFree10PacksButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseFree10PacksButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
_layoutPurchaseFree10PacksButton.SetFreePackLeaderSkinVisible(visible: false);
_layoutPurchaseFree10PacksButton.SetFreePackApealTextVisible(visible: true);
_layoutPurchaseFree10PacksButton.SetFreePackApealText(Data.SystemText.Get("Shop_0255", gachaInfo.PackCountBuyPer.ToString()));
_layoutPurchaseFree10PacksButton.SetBuyCostLabel(gachaInfo.PackCountBuyPer, (gachaInfo.PackCountBuyPer == 1) ? "Shop_0222" : "Shop_0233");
_free10PackEffect.Setup("cmn_frame_glow_1", 0, resourceList);
}
private void SetRotationStarterButton(PackConfig packConfig, PackChildGachaInfo gachaInfo, bool isPurchasable)
{
_layoutPurchaseCrystalButton.SetActiveLayout(isActive: true);
if (isPurchasable)
{
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: true);
_layoutPurchaseCrystalButton.SetToGrayPurchaseButton(isDisable: false);
_layoutPurchaseCrystalButton.SetOnClickPurchaseButton(delegate
{
_onClickPurchaseButton(packConfig, gachaInfo);
});
int cost = gachaInfo.Cost * 10;
_layoutPurchaseCrystalButton.SetBuyCostLabel(cost, "Shop_0112");
}
else
{
_layoutPurchaseCrystalButton.SetPurchasedVisible(visible: true);
_layoutPurchaseCrystalButton.SetActivePurchaseButton(isActive: false);
}
}
}

View File

@@ -1,68 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaPackPointLayout : MonoBehaviour
{
[SerializeField]
private GameObject _packPointGaugeRoot;
[SerializeField]
private UIGauge _packPointGauge;
[SerializeField]
private UILabel _packPointGaugePointLabel;
[SerializeField]
private UIButton _packPointExchangeButton;
[SerializeField]
private UILabel _packPointExchangeButtonLabel;
public void SetActivePackPointLayout(bool isActive)
{
_packPointGaugeRoot.gameObject.SetActive(isActive);
}
public void SetPackPointLayout(PackConfig packConfig, Action onClickExchange)
{
if ((packConfig.Category != PackCategory.None && packConfig.Category != PackCategory.LeaderSkinPack) || packConfig.GachaPointData == null)
{
SetActivePackPointLayout(isActive: false);
return;
}
SetActivePackPointLayout(isActive: true);
GachaPointData gachaPointData = packConfig.GachaPointData;
SetPointGauge(gachaPointData);
SetExchangeButton(gachaPointData, onClickExchange);
}
private void SetPointGauge(GachaPointData pointData)
{
_packPointGauge.Value = (float)pointData.GachaPoint / (float)pointData.ExchangeableGachaPoint;
_packPointGaugePointLabel.text = pointData.GachaPoint + "/" + pointData.ExchangeableGachaPoint;
}
private void SetExchangeButton(GachaPointData pointData, Action onClickExchange)
{
if (pointData.IsExchangeableGachaPoint)
{
_packPointExchangeButtonLabel.text = Data.SystemText.Get("Shop_0168");
_packPointExchangeButton.normalSprite = "btn_common_03_s_off";
_packPointExchangeButton.pressedSprite = "btn_common_03_s_on";
}
else
{
_packPointExchangeButtonLabel.text = Data.SystemText.Get("Shop_0169");
_packPointExchangeButton.normalSprite = "btn_common_02_s_off";
_packPointExchangeButton.pressedSprite = "btn_common_02_s_on";
}
_packPointExchangeButton.onClick.Clear();
_packPointExchangeButton.onClick.Add(new EventDelegate(delegate
{
onClickExchange.Call();
}));
}
}

View File

@@ -1,357 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.SpotCardExchange;
using Wizard.UI.Common;
namespace Wizard;
public class GachaPointExchange : MonoBehaviour
{
[SerializeField]
private SimpleScrollViewUI _gachaPointScrollView;
[SerializeField]
private TabList _tabListClass;
[SerializeField]
private UISprite _spriteClassTab;
private List<string> _loadedResourceList = new List<string>();
private UIAtlas _atlasProfile;
private List<UIBase_CardManager.CardObjData> _cardObjectList;
[SerializeField]
private GameObject _cardObjectRoot;
[SerializeField]
private GameObject _cardDetailRoot;
private CardDetailUI _cardDetail;
private List<string> _loadedCardResourceList = new List<string>();
private int _cardDetailIndex;
private CardBasePrm.ClanType _displayClassType = CardBasePrm.ClanType.NONE;
[SerializeField]
private GameObject _prefabRewardConfirmDialog;
[SerializeField]
private GameObject _prefabExchangeConfirmDialog;
private PackConfig _packConfig;
private Dictionary<CardBasePrm.ClanType, List<GachaPointExchangeInfo>> _exchangableRewardListInClassDict = new Dictionary<CardBasePrm.ClanType, List<GachaPointExchangeInfo>>();
private Action _closeDialogCallBack;
private Action _packInfoCallBack;
private int _gachaPointPackId => _packConfig.GachaPointData.GachaPointPackId;
public void SetCallBack(Action closeDialogCallBack, Action packInfoCallBack)
{
_closeDialogCallBack = closeDialogCallBack;
_packInfoCallBack = packInfoCallBack;
}
public void CreateCardList(PackConfig packConfig)
{
_packConfig = packConfig;
InitCardDetail();
StartCoroutine(LoadInitialResources(delegate
{
InitClassTab();
UpdateExchangeableCardList(CardBasePrm.ClanType.ALL);
}));
}
private IEnumerator LoadInitialResources(Action onFinish)
{
UIManager.GetInstance().createInSceneCenterLoading();
yield return StartCoroutine(LoadProfileAtlas());
UIManager.GetInstance().closeInSceneCenterLoading();
onFinish.Call();
}
private IEnumerator LoadProfileAtlas()
{
string profileAtlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null);
yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(profileAtlasName, null));
_loadedResourceList.Add(profileAtlasName);
profileAtlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null, isload: true);
_atlasProfile = Toolbox.ResourcesManager.LoadObject<GameObject>(profileAtlasName).GetComponent<UIAtlas>();
}
private void InitCardDetail()
{
_cardDetail = DialogCreator.CreateCardDetailDialog(_cardDetailRoot, "Detail");
_cardDetail.OnDragCard = CardDetailDragCallback;
_cardDetail.OnDetailCardUpdate = UpdateCardDetailArrowButtonVisible;
_cardDetail.gameObject.SetActive(value: false);
}
private IEnumerator LoadCardObject(List<int> cardIdList, Action onFinish)
{
if (cardIdList.Count == 0)
{
onFinish.Call();
yield break;
}
UnloadCardObject();
UIManager uiMgr = UIManager.GetInstance();
uiMgr.createInSceneCenterLoading();
bool isLoaded = false;
uiMgr.CardLoadSelect(null, cardIdList, base.gameObject.layer, is2D: true, delegate
{
isLoaded = true;
});
while (!isLoaded)
{
yield return null;
}
InitCardObject();
uiMgr.closeInSceneCenterLoading();
onFinish.Call();
}
private void InitCardObject()
{
List<UIBase_CardManager.CardObjData> cardList2DObjs = UIManager.GetInstance().getCardList2DObjs();
_cardObjectList = new List<UIBase_CardManager.CardObjData>(cardList2DObjs);
cardList2DObjs.Clear();
List<string> cardListAssetPathList = Toolbox.ResourcesManager.CardListAssetPathList;
_loadedCardResourceList.AddRange(new List<string>(cardListAssetPathList));
cardListAssetPathList.Clear();
if (_cardObjectList == null)
{
return;
}
for (int i = 0; i < _cardObjectList.Count; i++)
{
GameObject cardObject = _cardObjectList[i].CardObj;
cardObject.SetActive(value: false);
UITexture[] componentsInChildren = cardObject.GetComponentsInChildren<UITexture>();
foreach (UITexture uITexture in componentsInChildren)
{
if (uITexture.name.Contains("CardTexture"))
{
UITexture component = uITexture.GetComponent<UITexture>();
Material material = component.material;
component.mainTexture = material.mainTexture;
component.material = null;
}
}
cardObject.transform.parent = _cardObjectRoot.transform;
CardListTemplate component2 = cardObject.GetComponent<CardListTemplate>();
component2.HideNum();
component2._newLabel.gameObject.SetActive(value: false);
component2.SetId(_cardObjectList[i].ids);
component2.SetScale(0.36f);
component2.AddDepth(20);
int tempIndex = i;
component2.AddColliderToFrame(0.9f).onClick = delegate
{
_cardDetailIndex = tempIndex;
_cardDetail.OnPushCardDetailOn(cardObject);
};
}
}
private void CardDetailDragCallback(Vector2 vec)
{
if (!_cardDetail.IsEnableShowDetail)
{
return;
}
float x = vec.x;
if (!(Mathf.Abs(x) < 70f))
{
int num = _cardDetailIndex + ((!(x > 0f)) ? 1 : (-1));
if (num >= 0 && _cardObjectList.Count > num)
{
_cardDetail.CloseDefault(playSe: false);
_cardDetail.ShowCardDetail(_cardObjectList[num].CardObj);
_cardDetailIndex = num;
UpdateCardDetailArrowButtonVisible();
}
}
}
private void UpdateCardDetailArrowButtonVisible()
{
_cardDetail.LeftButtonVisible = _cardDetailIndex > 0;
_cardDetail.RightButtonVisible = _cardDetailIndex < _cardObjectList.Count - 1;
}
private void UnloadCardObject()
{
Toolbox.ResourcesManager.RemoveAssetGroup(_loadedCardResourceList);
_loadedCardResourceList.Clear();
if (_cardObjectList != null)
{
for (int i = 0; i < _cardObjectList.Count; i++)
{
UnityEngine.Object.Destroy(_cardObjectList[i].CardObj.gameObject);
}
_cardObjectList.Clear();
}
}
private void InitClassTab()
{
_spriteClassTab.atlas = _atlasProfile;
for (int i = 0; i < 9; i++)
{
CardBasePrm.ClanType classType = (CardBasePrm.ClanType)i;
string spriteBaseName = ((classType != CardBasePrm.ClanType.ALL) ? ("class_tab_" + i.ToString("00")) : "class_tab_neutral");
_tabListClass.AddTab(delegate
{
if (classType != _displayClassType)
{
ShowExchangeableCardList(classType);
}
}, spriteBaseName).name = "Class_" + i + "(Clone)";
}
_tabListClass.Reset(notSelectTab: true);
}
private void GrayOutUnnecessaryTab(ref CardBasePrm.ClanType displayClassType)
{
bool flag = false;
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.ALL; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
if (_exchangableRewardListInClassDict[clanType].Count == 0)
{
_tabListClass.SetTabToGrayByIndex((int)clanType, disable: true);
}
else if (!flag)
{
flag = true;
displayClassType = clanType;
}
}
}
private void UpdateExchangeableCardList(CardBasePrm.ClanType displayClassType)
{
GachaPointExchangeInfoTask task = new GachaPointExchangeInfoTask();
task.SetParameter(_packConfig.PackId, _gachaPointPackId);
StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate
{
_exchangableRewardListInClassDict = task.ExchangeableRewardListInClassDict;
GrayOutUnnecessaryTab(ref displayClassType);
_tabListClass.SelectTabByIndex((int)displayClassType, isForceSet: true);
}));
}
private void ShowExchangeableCardList(CardBasePrm.ClanType classType)
{
_displayClassType = classType;
List<GachaPointExchangeInfo> cardList = _exchangableRewardListInClassDict[_displayClassType];
_gachaPointScrollView.SetVisiable(isVisiable: false);
List<int> list = new List<int>(cardList.Count);
for (int i = 0; i < cardList.Count; i++)
{
list.Add(cardList[i].CardId);
}
StartCoroutine(LoadCardObject(list, delegate
{
_gachaPointScrollView.SetVisiable(isVisiable: true);
_gachaPointScrollView.CreateScrollView(cardList.Count, InitializePlate);
}));
}
private void InitializePlate(int index, GameObject plate)
{
List<GachaPointExchangeInfo> list = _exchangableRewardListInClassDict[_displayClassType];
if (index >= list.Count)
{
plate.SetActive(value: false);
return;
}
GachaPointExchangePlate component = plate.GetComponent<GachaPointExchangePlate>();
component.SetData(list[index], OnClickConfirmExchangeButton, _packConfig.GachaPointData.IsExchangeableGachaPoint);
component.SetCardObject(_cardObjectList[index].CardObj, _cardObjectRoot);
}
private void OnClickConfirmExchangeButton(GachaPointExchangeInfo gachaPointExchangeInfo)
{
ShowConfirmExchangeDialog(gachaPointExchangeInfo);
}
private void ShowConfirmExchangeDialog(GachaPointExchangeInfo gachaPointExchangeInfo)
{
SystemText systemText = Data.SystemText;
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0173"));
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn);
dialogBase.SetButtonText(systemText.Get("Shop_0154"));
dialogBase.SetPanelSortingOrder(2);
dialogBase.SetPanelDepth(600);
dialogBase.onPushButton1 = (Action)Delegate.Combine(dialogBase.onPushButton1, (Action)delegate
{
OnClickExchangeButton(gachaPointExchangeInfo);
});
string mainTextFirst = systemText.Get("Shop_0164", _packConfig.GachaPointData.ExchangeableGachaPoint.ToString());
string mainTextSecond = systemText.Get("Shop_0174", gachaPointExchangeInfo.GetExchangeCardText());
if (gachaPointExchangeInfo.RewardList.Count == 0)
{
dialogBase.SetSize(DialogBase.Size.S);
ExchangeConfirmDialog component = NGUITools.AddChild(dialogBase.gameObject, _prefabExchangeConfirmDialog).GetComponent<ExchangeConfirmDialog>();
string empty = string.Empty;
component.SetText(mainTextFirst, mainTextSecond, empty);
}
else if (gachaPointExchangeInfo.IsReceived)
{
dialogBase.SetSize(DialogBase.Size.S);
ExchangeConfirmDialog component2 = NGUITools.AddChild(dialogBase.gameObject, _prefabExchangeConfirmDialog).GetComponent<ExchangeConfirmDialog>();
string subText = systemText.Get("Shop_0166");
component2.SetText(mainTextFirst, mainTextSecond, subText);
}
else
{
dialogBase.SetSize(DialogBase.Size.M);
RewardConfirmDialog component3 = NGUITools.AddChild(dialogBase.gameObject, _prefabRewardConfirmDialog).GetComponent<RewardConfirmDialog>();
string subText2 = systemText.Get("Shop_0165");
component3.CreateRewardConfirmDialog(gachaPointExchangeInfo, 610, 2);
component3.SetText(mainTextFirst, mainTextSecond, subText2);
component3.transform.localPosition = Vector3.forward * 10f;
}
}
private void OnClickExchangeButton(GachaPointExchangeInfo gachaPointExchangeInfo)
{
GachaPointExchangeTask gachaPointExchangeTask = new GachaPointExchangeTask();
gachaPointExchangeTask.SetParameter(gachaPointExchangeInfo.CardId, _gachaPointPackId, _packConfig.PackId);
StartCoroutine(Toolbox.NetworkManager.Connect(gachaPointExchangeTask, delegate
{
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_PACK_ID, _packConfig.PackId);
_packInfoCallBack.Call();
ShowSuccessExchangeDialog(gachaPointExchangeInfo.GetExchangeCardText());
}));
}
private void ShowSuccessExchangeDialog(string exchangedCardName)
{
SystemText systemText = Data.SystemText;
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetTitleLabel(systemText.Get("Common_0021"));
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
dialogBase.SetText(systemText.Get("Shop_0155", exchangedCardName), isWrapText: true);
dialogBase.SetPanelDepth(600);
dialogBase.OnClose = delegate
{
_closeDialogCallBack.Call();
};
}
}

View File

@@ -1,32 +0,0 @@
using System;
using UnityEngine;
namespace Wizard;
public class GachaPointExchangeDialog : MonoBehaviour
{
[SerializeField]
private GachaPointExchange _gachaPointExchangeOriginal;
private DialogBase _dialog;
public void CreateGachaPointExchangeDialog(PackConfig packConfig, Action packInfoCallBack)
{
_dialog = UIManager.GetInstance().CreateDialogClose();
_dialog.SetSize(DialogBase.Size.XL);
_dialog.SetTitleLabel(Data.SystemText.Get("Shop_0160", Data.Master.CardSetNameMgr.Get(packConfig.GachaPointData.GachaPointPackId.ToString()).LongName));
_dialog.SetLayer("MyPage");
_dialog.SetPanelSortingOrder(37);
_dialog.SetPanelDepth(900);
GachaPointExchange gachaPointExchange = UnityEngine.Object.Instantiate(_gachaPointExchangeOriginal);
_dialog.SetObj(gachaPointExchange.gameObject);
gachaPointExchange.SetCallBack(CloseExchangeDialog, packInfoCallBack);
gachaPointExchange.CreateCardList(packConfig);
}
public void CloseExchangeDialog()
{
_dialog.CloseWithoutSelect();
}
}

View File

@@ -1,42 +0,0 @@
using System.Collections.Generic;
using LitJson;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class GachaPointExchangeInfo
{
public int CardId { get; private set; }
public CardBasePrm.ClanType Class { get; private set; }
public List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> RewardList { get; private set; }
public bool IsReceived { get; private set; }
public bool IsDisplayPrize { get; private set; }
public int ExchangeNum { get; private set; }
public GachaPointExchangeInfo(JsonData data)
{
CardId = data["card_id"].ToInt();
Class = (CardBasePrm.ClanType)data["class_id"].ToInt();
JsonData jsonData = data["reward_list"];
int count = jsonData.Count;
RewardList = new List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward>();
for (int i = 0; i < count; i++)
{
RewardList.Add(new Wizard.Scripts.Network.Data.TaskData.Arena.Reward(jsonData[i]));
}
IsReceived = data["is_received"].ToBoolean();
IsDisplayPrize = data.GetValueOrDefault("is_display_prize", defaultValue: false);
ExchangeNum = 1;
}
public string GetExchangeCardText()
{
string userGoodsName = UserGoods.getUserGoodsName(UserGoods.Type.Card, CardId);
return Data.SystemText.Get("Shop_0150", userGoodsName, ExchangeNum.ToString());
}
}

View File

@@ -1,113 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class GachaPointExchangePlate : MonoBehaviour
{
private readonly Quaternion CARDOBJECT_ROTATION_QUATERNION = new Quaternion(0f, 0f, 0f, 0f);
[SerializeField]
private GameObject _objCardRoot;
[SerializeField]
private UILabel _labelCardName;
[SerializeField]
private UILabel _labelCardPossessionNum;
[SerializeField]
private UILabel _labelCardPossessionNumNormal;
[SerializeField]
private UILabel _labelCardPossessionNumPremium;
[SerializeField]
private UIButton _btnExchangeCard;
[SerializeField]
private UILabel _labelReward;
[SerializeField]
private UILabel _labelOwnedReward;
private GameObject _cardObject;
public void SetData(GachaPointExchangeInfo gachaPointInfo, Action<GachaPointExchangeInfo> onClickExchangButton, bool isExchangeable)
{
string text = gachaPointInfo.GetExchangeCardText();
if (gachaPointInfo.RewardList.Any((Wizard.Scripts.Network.Data.TaskData.Arena.Reward c) => c.UserGoodsData.GoodsType == UserGoods.Type.Skin))
{
text = Data.SystemText.Get("Shop_0232") + " " + text;
}
if (gachaPointInfo.IsDisplayPrize)
{
text = Data.SystemText.Get("Shop_0235") + " " + text;
}
_labelCardName.text = text;
DataMgr dataMgr = null; // Pre-Phase-5b: headless has no DataMgr
int possessionCardNum = dataMgr.GetPossessionCardNum(gachaPointInfo.CardId, isIncludingSpotCard: false);
int spotCardNum = dataMgr.SpotCardData.GetSpotCardNum(gachaPointInfo.CardId);
_labelCardPossessionNumNormal.text = possessionCardNum + ((spotCardNum > 0) ? $"[fcd24a]+{spotCardNum}[-]" : string.Empty);
int cardId = gachaPointInfo.CardId + 1;
int possessionCardNum2 = dataMgr.GetPossessionCardNum(cardId, isIncludingSpotCard: false);
_labelCardPossessionNumPremium.text = possessionCardNum2.ToString();
int num = possessionCardNum + possessionCardNum2 + spotCardNum;
_labelCardPossessionNum.text = num.ToString();
_btnExchangeCard.onClick.Clear();
if (isExchangeable)
{
_btnExchangeCard.onClick.Add(new EventDelegate(delegate
{
onClickExchangButton(gachaPointInfo);
}));
UIManager.SetObjectToGrey(_btnExchangeCard.gameObject, b: false);
}
else
{
_btnExchangeCard.isEnabled = false;
UIManager.SetObjectToGrey(_btnExchangeCard.gameObject, b: true);
}
if (gachaPointInfo.RewardList.Count > 0)
{
_labelReward.text = GetRewardListText(gachaPointInfo.RewardList);
}
else
{
_labelReward.text = string.Empty;
}
if (gachaPointInfo.IsReceived)
{
_labelOwnedReward.gameObject.SetActive(value: true);
_labelOwnedReward.text = Data.SystemText.Get("Shop_0163");
}
else
{
_labelOwnedReward.gameObject.SetActive(value: false);
}
}
public void SetCardObject(GameObject cardObject, GameObject evacuationParent)
{
if (_cardObject != null)
{
_cardObject.SetActive(value: false);
_cardObject.transform.parent = evacuationParent.transform;
}
cardObject.transform.parent = _objCardRoot.transform;
cardObject.transform.localPosition = Vector3.zero;
cardObject.transform.rotation = CARDOBJECT_ROTATION_QUATERNION;
cardObject.SetActive(value: true);
_cardObject = cardObject;
}
private static string GetRewardListText(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList)
{
return UIUtil.CreateListText(rewardList.Select((Wizard.Scripts.Network.Data.TaskData.Arena.Reward reward) => reward.UserGoodsData).OrderBy(GachaUtil.GetRewardListSortIndex).Select(GachaUtil.GetRewardListGoodsTypeName)
.Distinct()
.ToList(), Data.SystemText.Get("Shop_0226"), Data.SystemText.Get("Shop_0225"));
}
}

View File

@@ -1,513 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaResultBuyCardPack : UIBase
{
private readonly int[] MAX_COLUMN_RARELITY = new int[4] { 8, 8, 8, 8 };
private readonly Vector3 GRID_LOCAL_POSITION = Vector3.up * -6f;
private readonly Vector3 GRID_ONLY_ONE_LOCAL_POSITION = Vector3.up * -15f;
private readonly Vector3 NEW_LABEL_POSITION = Vector3.up * -150f;
private bool m_isCenterLoading;
[SerializeField]
private UIButton m_buttonNext;
[SerializeField]
private UIButton m_buttonPrev;
[SerializeField]
private UIGrid gridLegendary;
[SerializeField]
private UIGrid gridGold;
[SerializeField]
private UIGrid gridSilver;
[SerializeField]
private UIGrid gridBronze;
[SerializeField]
private GameObject cardObjPool;
[SerializeField]
private GameObject parentLegendary;
[SerializeField]
private GameObject parentGold;
[SerializeField]
private GameObject parentSilver;
[SerializeField]
private GameObject parentBronze;
[SerializeField]
private UILabel labelLegendary;
[SerializeField]
private UILabel labelGold;
[SerializeField]
private UILabel labelSilver;
[SerializeField]
private UILabel labelBronze;
[SerializeField]
private GameObject m_RarityParentRow1;
[SerializeField]
private GameObject m_RarityParentRow2;
[SerializeField]
private UIToggle m_IndicatorBase;
[SerializeField]
private UITexture _particleTexture;
private List<List<CardPack>> m_CardPackListPerPage = new List<List<CardPack>>();
private Dictionary<int, List<UIBase_CardManager.CardObjData>> m_Page_LoadedCard_Dictionary = new Dictionary<int, List<UIBase_CardManager.CardObjData>>();
private Dictionary<int, int> m_CardId_Num_Dictionary = new Dictionary<int, int>();
private List<string> m_LoadedAssetPathList = new List<string>();
private int currentPage;
private List<int> _specialEffectCardList = new List<int>();
private List<UIToggle> m_IndicaatorList = new List<UIToggle>();
private CardDetailUI m_cardDetailUI;
private bool m_isInitLoadFinish;
private bool _isLoadEffectFinish;
private List<string> _loadEffectList = new List<string>();
private List<GameObject> _effectList = new List<GameObject>();
private bool _isWaitingEffectMaterial;
private UIParticleEffectGroup _particleGroup;
public bool IsFlickEnable { get; set; }
public bool IsLoading { get; private set; }
public List<string> _loadedAssetPathList => m_LoadedAssetPathList;
public bool IsDialogCloseStart { get; set; }
public void Init(List<CardPack> cardPackList, CardDetailUI cardDetailUI)
{
m_cardDetailUI = cardDetailUI;
IsFlickEnable = true;
List<CardPack> list = new List<CardPack>();
for (int i = 0; i < cardPackList.Count; i++)
{
int card_id = cardPackList[i].card_id;
if (m_CardId_Num_Dictionary.ContainsKey(card_id))
{
m_CardId_Num_Dictionary[card_id]++;
continue;
}
m_CardId_Num_Dictionary.Add(card_id, 1);
list.Add(cardPackList[i]);
}
foreach (CardPack cardPack in cardPackList)
{
if (cardPack.IsFreePackLeaderSkin)
{
_specialEffectCardList.Add(cardPack.card_id);
}
}
List<CardPack> list2 = new List<CardPack>();
list2.AddRange(SortCardList(list.FindAll((CardPack m) => m.rarity == 4)));
list2.AddRange(SortCardList(list.FindAll((CardPack m) => m.rarity == 3)));
list2.AddRange(SortCardList(list.FindAll((CardPack m) => m.rarity == 2)));
list2.AddRange(SortCardList(list.FindAll((CardPack m) => m.rarity == 1)));
DividCardListEachPages(list2);
GameObject gameObject = m_IndicatorBase.transform.parent.gameObject;
if (m_CardPackListPerPage.Count <= 1)
{
gameObject.SetActive(value: false);
return;
}
gameObject.SetActive(value: true);
m_IndicaatorList.Add(m_IndicatorBase);
for (int num = 1; num < m_CardPackListPerPage.Count; num++)
{
m_IndicaatorList.Add(NGUITools.AddChild(gameObject, m_IndicatorBase.gameObject).GetComponent<UIToggle>());
}
gameObject.GetComponent<UIGrid>().Reposition();
}
public IEnumerator ViewCardList(int page)
{
currentPage = page;
if (page > 1)
{
m_buttonPrev.gameObject.SetActive(value: true);
}
else
{
m_buttonPrev.gameObject.SetActive(value: false);
}
if (page < m_CardPackListPerPage.Count)
{
m_buttonNext.gameObject.SetActive(value: true);
}
else
{
m_buttonNext.gameObject.SetActive(value: false);
}
if (m_IndicaatorList.Count > 1)
{
m_IndicaatorList[page - 1].value = true;
}
RemoveCardObjFromGrid(gridLegendary);
RemoveCardObjFromGrid(gridGold);
RemoveCardObjFromGrid(gridSilver);
RemoveCardObjFromGrid(gridBronze);
if (m_Page_LoadedCard_Dictionary.ContainsKey(page))
{
CompleteLoadCard();
}
else if (IsLoading)
{
SetCenterLoading(isVisible: true);
labelLegendary.gameObject.SetActive(value: false);
labelGold.gameObject.SetActive(value: false);
labelSilver.gameObject.SetActive(value: false);
labelBronze.gameObject.SetActive(value: false);
while (IsLoading)
{
yield return null;
}
CompleteLoadCard();
}
else
{
yield return StartCoroutine(LoadCardList(page, CompleteLoadCard));
}
}
private void CompleteLoadCard()
{
AddCardObjToGrid(m_Page_LoadedCard_Dictionary[currentPage]);
SetCenterLoading(isVisible: false);
if (m_Page_LoadedCard_Dictionary.Count < m_CardPackListPerPage.Count && m_Page_LoadedCard_Dictionary.Count == currentPage && !IsLoading)
{
StartCoroutine(LoadCardList(currentPage + 1, delegate
{
m_isInitLoadFinish = true;
}));
}
}
protected override void OnDestroy()
{
base.OnDestroy();
DisposeEffect();
}
private IEnumerator LoadEffect()
{
if (!_isLoadEffectFinish)
{
_loadEffectList.Add(Toolbox.ResourcesManager.GetAssetTypePath("gch_result_skin_1", ResourcesManager.AssetLoadPathType.Effect2D));
yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadEffectList, delegate
{
}));
_isLoadEffectFinish = true;
}
}
private void DisposeEffect()
{
if (_loadEffectList.Count != 0)
{
Toolbox.ResourcesManager.RemoveAssetGroup(_loadEffectList);
_loadEffectList.Clear();
ReleaseParticleEffectGroup();
}
}
private IEnumerator LoadCardList(int page, Action callback = null)
{
if (m_Page_LoadedCard_Dictionary.ContainsKey(page))
{
callback.Call();
yield break;
}
IsLoading = true;
if (_specialEffectCardList.Count > 0)
{
yield return LoadEffect();
}
while (_isWaitingEffectMaterial)
{
yield return null;
}
List<int> idList = m_CardPackListPerPage[page - 1].ConvertAll((CardPack conv) => conv.card_id);
yield return null;
UIManager.GetInstance().CardLoadGachaPack(base.gameObject, idList, 24, is2D: true);
while (!UIManager.GetInstance().getUIBase_CardManager().getCreateEndFlag() || !UIManager.GetInstance().getUIBase_CardManager().isAssetAllReady)
{
yield return null;
}
List<UIBase_CardManager.CardObjData> cardList2DObjs = UIManager.GetInstance().getCardList2DObjs();
m_Page_LoadedCard_Dictionary.Add(page, cardList2DObjs);
m_LoadedAssetPathList.AddRange(Toolbox.ResourcesManager.CardListAssetPathList);
Toolbox.ResourcesManager.CardListAssetPathList.Clear();
Toolbox.ResourcesManager.Card2DAssetPathList.Clear();
for (int num = 0; num < cardList2DObjs.Count; num++)
{
GameObject cardObj = cardList2DObjs[num].CardObj;
CardListTemplate component = cardObj.GetComponent<CardListTemplate>();
component.SetNum(m_CardId_Num_Dictionary[cardList2DObjs[num].ids]);
cardObj.AddComponent<BoxCollider>().size = component._cardTexture.localSize;
UIEventListener.Get(cardObj).onClick = m_cardDetailUI.OnPushCardDetailOn;
cardObj.transform.parent = cardObjPool.transform;
cardObj.transform.localPosition = Vector3.zero;
cardObj.SetActive(value: false);
cardObj.SetActive(value: true);
}
IsLoading = false;
callback.Call();
}
private void SetCenterLoading(bool isVisible)
{
m_isCenterLoading = isVisible;
if (isVisible)
{
UIManager.GetInstance().createInSceneCenterLoading();
}
else
{
UIManager.GetInstance().closeInSceneCenterLoading();
}
}
private List<CardPack> SortCardList(List<CardPack> cardList)
{
List<int> idList = cardList.ConvertAll((CardPack conv) => conv.card_id);
idList = UIManager.GetInstance().getUIBase_CardManager().SortIDList(idList, CardMaster.CardMasterId.Default);
cardList = idList.ConvertAll((int conv) => cardList.Find((CardPack find) => find.card_id == conv));
return cardList;
}
private void DividCardListEachPages(List<CardPack> cardPackList)
{
List<CardPack> list = new List<CardPack>();
int rarity = cardPackList[0].rarity;
int num = 1;
int num2 = 0;
for (int i = 0; i < cardPackList.Count; i++)
{
if (cardPackList[i].rarity <= MAX_COLUMN_RARELITY.Length)
{
num2++;
if (rarity != cardPackList[i].rarity)
{
num++;
num2 = 1;
rarity = cardPackList[i].rarity;
}
else if (num2 > MAX_COLUMN_RARELITY[rarity - 1])
{
num++;
num2 = 1;
}
if (num > 2)
{
num = 1;
m_CardPackListPerPage.Add(list);
list = new List<CardPack>();
list.Add(cardPackList[i]);
}
else
{
list.Add(cardPackList[i]);
}
}
}
if (list.Count > 0)
{
m_CardPackListPerPage.Add(list);
}
}
private void RemoveCardObjFromGrid(UIGrid gridObj)
{
List<Transform> childList = gridObj.GetChildList();
for (int i = 0; i < childList.Count; i++)
{
childList[i].transform.parent = cardObjPool.transform;
childList[i].transform.localPosition = Vector3.zero;
}
}
private void ReleaseParticleEffectGroup()
{
if (_particleGroup != null)
{
UIParticleEffectManager.Instance.Remove(_particleGroup);
_particleGroup = null;
}
}
private void AddCardObjToGrid(List<UIBase_CardManager.CardObjData> cardObjList)
{
bool flag = false;
bool flag2 = false;
bool flag3 = false;
bool flag4 = false;
foreach (GameObject effect in _effectList)
{
UnityEngine.Object.Destroy(effect);
}
_effectList.Clear();
ReleaseParticleEffectGroup();
for (int i = 0; i < cardObjList.Count; i++)
{
CardParameter cardParameterFromId = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(cardObjList[i].ids);
GameObject cardObj = cardObjList[i].CardObj;
switch (cardParameterFromId.Rarity)
{
case 1:
flag = true;
gridBronze.AddChild(cardObj.transform);
cardObj.transform.localScale = Vector3.one * 0.55f;
break;
case 2:
flag2 = true;
gridSilver.AddChild(cardObj.transform);
cardObj.transform.localScale = Vector3.one * 0.55f;
break;
case 3:
flag3 = true;
gridGold.AddChild(cardObj.transform);
cardObj.transform.localScale = Vector3.one * 0.55f;
break;
case 4:
flag4 = true;
gridLegendary.AddChild(cardObj.transform);
cardObj.transform.localScale = Vector3.one * 0.55f;
break;
}
if (_specialEffectCardList.Contains(cardObjList[i].ids))
{
_isWaitingEffectMaterial = true;
if (_particleGroup == null)
{
_particleGroup = UIParticleEffectManager.Instance.CreateNewGroup(_particleTexture);
}
Effect2dCreateParam param = new Effect2dCreateParam
{
Parent = cardObj.gameObject,
EffectName = "gch_result_skin_1",
InitActive = false,
UnloadAssetList = _loadEffectList,
MaterialSetEndCallback = delegate
{
_isWaitingEffectMaterial = false;
}
};
_particleGroup.StartEffect(param, isEnableUpdateReposition: true);
}
cardObj.transform.localPosition += Vector3.back;
if (false /* Pre-Phase-5b: no new-card state headless */)
{
cardObj.GetComponent<CardListTemplate>()._newLabel.transform.localPosition = NEW_LABEL_POSITION;
}
cardObj.SetActive(value: true);
}
SystemText systemText = Data.SystemText;
labelLegendary.gameObject.SetActive(flag4);
if (flag4)
{
labelLegendary.text = systemText.Get("Card_Rarity_0004");
}
labelGold.gameObject.SetActive(flag3);
if (flag3)
{
labelGold.text = systemText.Get("Card_Rarity_0003");
}
labelSilver.gameObject.SetActive(flag2);
if (flag2)
{
labelSilver.text = systemText.Get("Card_Rarity_0002");
}
labelBronze.gameObject.SetActive(flag);
if (flag)
{
labelBronze.text = systemText.Get("Card_Rarity_0001");
}
UIGrid uIGrid = null;
if (flag4)
{
parentLegendary.transform.parent = m_RarityParentRow1.transform;
parentLegendary.transform.localPosition = Vector3.zero;
uIGrid = gridLegendary;
}
else if (flag3)
{
parentGold.transform.parent = m_RarityParentRow1.transform;
parentGold.transform.localPosition = Vector3.zero;
uIGrid = gridGold;
}
else if (flag2)
{
parentSilver.transform.parent = m_RarityParentRow1.transform;
parentSilver.transform.localPosition = Vector3.zero;
uIGrid = gridSilver;
}
else
{
parentBronze.transform.parent = m_RarityParentRow1.transform;
parentBronze.transform.localPosition = Vector3.zero;
uIGrid = gridBronze;
}
if ((flag && flag2) || (flag && flag3) || (flag && flag4))
{
parentBronze.transform.parent = m_RarityParentRow2.transform;
parentBronze.transform.localPosition = Vector3.zero;
uIGrid.transform.localPosition = GRID_LOCAL_POSITION;
gridBronze.transform.localPosition = GRID_LOCAL_POSITION;
}
else if ((flag2 && flag3) || (flag2 && flag4))
{
parentSilver.transform.parent = m_RarityParentRow2.transform;
parentSilver.transform.localPosition = Vector3.zero;
uIGrid.transform.localPosition = GRID_LOCAL_POSITION;
gridSilver.transform.localPosition = GRID_LOCAL_POSITION;
}
else if (flag3 && flag4)
{
parentGold.transform.parent = m_RarityParentRow2.transform;
parentGold.transform.localPosition = Vector3.zero;
uIGrid.transform.localPosition = GRID_LOCAL_POSITION;
gridGold.transform.localPosition = GRID_LOCAL_POSITION;
}
else
{
uIGrid.transform.localPosition = GRID_ONLY_ONE_LOCAL_POSITION;
}
}
}

View File

@@ -1,94 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaResultBuyCardPackDialog : MonoBehaviour
{
[SerializeField]
private GachaResultBuyCardPack _prefabGachaResultBuyCardPack;
private GachaResultBuyCardPack _objGachaResultBuyCardPack;
private List<string> _loadedAssetPathListResultDialog;
public DialogBase Dialog { get; private set; }
public bool IsLoading => _objGachaResultBuyCardPack.IsLoading;
public bool IsFlickEnable
{
set
{
if (_objGachaResultBuyCardPack != null)
{
_objGachaResultBuyCardPack.IsFlickEnable = value;
}
}
}
public void Create(PackOpenDetail packOpenData, CardDetailUI cardDetailDialog)
{
Dialog = UIManager.GetInstance().CreateDialogClose();
Dialog.gameObject.layer = LayerMask.NameToLayer("MyPage");
Dialog.SetBackViewLayer(LayerMask.NameToLayer("MyPage"));
Dialog.SetPanelSortingOrder(2);
Dialog.SetPanelDepth(500);
Dialog.SetSize(DialogBase.Size.XL);
Dialog.SetTitleLabel(Data.SystemText.Get("Shop_0010"));
Dialog.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
Dialog.OpenSe = 0;
Dialog.OnCloseStart = OnCloseStartResultDialog;
Dialog.OnClose = OnCloseResultDialog;
_objGachaResultBuyCardPack = UnityEngine.Object.Instantiate(_prefabGachaResultBuyCardPack);
Dialog.SetObj(_objGachaResultBuyCardPack.gameObject);
_objGachaResultBuyCardPack.GetComponent<UIPanel>().sortingOrder = 2;
_objGachaResultBuyCardPack.Init(packOpenData.pack_list, cardDetailDialog);
StartCoroutine(_objGachaResultBuyCardPack.ViewCardList(1));
}
public void AddOnClose(Action onClose)
{
DialogBase dialog = Dialog;
dialog.OnClose = (Action)Delegate.Combine(dialog.OnClose, onClose);
}
private void OnCloseStartResultDialog()
{
_objGachaResultBuyCardPack.IsDialogCloseStart = true;
_loadedAssetPathListResultDialog = _objGachaResultBuyCardPack._loadedAssetPathList;
}
private void OnCloseResultDialog()
{
StartCoroutine(RemoveResultDialogResources());
}
private IEnumerator RemoveResultDialogResources()
{
UIBase_CardManager cardManager = UIManager.GetInstance().getUIBase_CardManager();
while (!cardManager.getCreateEndFlag() || !cardManager.isAssetAllReady)
{
yield return null;
}
List<UIBase_CardManager.CardObjData> cardList2DObjs = UIManager.GetInstance().getCardList2DObjs();
if (cardList2DObjs.Count > 0)
{
cardList2DObjs.ForEach(delegate(UIBase_CardManager.CardObjData g)
{
UnityEngine.Object.Destroy(g.CardObj);
});
}
if (Toolbox.ResourcesManager.CardListAssetPathList.Count > 0)
{
_loadedAssetPathListResultDialog.AddRange(Toolbox.ResourcesManager.CardListAssetPathList);
Toolbox.ResourcesManager.CardListAssetPathList.Clear();
}
Toolbox.ResourcesManager.RemoveAssetGroup(_loadedAssetPathListResultDialog);
_loadedAssetPathListResultDialog.Clear();
}
}

View File

@@ -1,108 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class GachaSelectBuyNumPopup : SelectBuyNumPopupBase
{
protected override string _labelBuyNumPurchaseBtnTextId => "Shop_0046";
public void Init(DialogBase dialog, PackConfig packConfig, PackChildGachaInfo info, int ableBuyNum, Action<PackConfig, PackChildGachaInfo, int> OnClickPurchase)
{
_dialog = dialog;
_gachaCostPerPack = info.Cost;
_ableBuyNum = ableBuyNum;
InitBuyMeansDisplasys(packConfig, info);
_PackLogo.mainTexture = Toolbox.ResourcesManager.LoadObject(packConfig.GetPackTitleLogoTexturePath(isFetch: true)) as Texture;
if (packConfig.IsPrerelease && packConfig.PrereleasePurchaseInfo.IsCountLimitedPrerelease)
{
int num = packConfig.PrereleasePurchaseInfo.CurrentCount;
int num2 = packConfig.PrereleasePurchaseInfo.LimitCount;
GachaUI.CardPackType packType = info.PackType;
if (packType != GachaUI.CardPackType.CRYSTAL_MULTI && (uint)(packType - 4) <= 3u)
{
num = packConfig.PrereleasePurchaseInfo.TicketRupyCountCurrent;
num2 = packConfig.PrereleasePurchaseInfo.TicketRupyCountLimit;
}
_buyPackLabel.text = Data.SystemText.Get("Shop_0047", packConfig.Title) + "\n" + Data.SystemText.Get("Shop_0202", num.ToString(), num2.ToString());
}
else
{
_buyPackLabel.text = Data.SystemText.Get("Shop_0047", packConfig.Title) + "\n" + Data.SystemText.Get("Shop_0048");
}
if (packConfig.Category == PackCategory.LeaderSkinPack)
{
_buyPackLabel.width = 818;
}
UpdateBuyNumDisplays();
UIEventListener.Get(_buttonPlus.gameObject).onPress = base.OnPressToPlusBtn;
UIEventListener.Get(_buttonMinus.gameObject).onPress = base.OnPressToMinusBtn;
UIEventListener.Get(_buttonMax.gameObject).onClick = delegate
{
OnBtnMax();
};
UIEventListener.Get(_buttonPurchase.gameObject).onClick = delegate
{
OnBtnPurchase(OnClickPurchase, packConfig, info);
};
}
private void InitBuyMeansDisplasys(PackConfig packConfig, PackChildGachaInfo gachaInfo)
{
_iconTicket.gameObject.SetActive(value: false);
_iconRupy.gameObject.SetActive(value: false);
_iconCrystal.gameObject.SetActive(value: false);
SystemText systemText = Data.SystemText;
switch (gachaInfo.PackType)
{
case GachaUI.CardPackType.TICKET_MULTI:
_buttonPurchase.normalSprite = "btn_input_04_off";
_buttonPurchase.pressedSprite = "btn_input_04_on";
_labelCostNamePurchaseBtn.text = systemText.Get("Shop_0060");
_labelHaveItemName.text = systemText.Get("Shop_0063");
_labelHaveNumItems.text = gachaInfo.CostGoodsCount.ToString();
_labelCostPerPack.text = systemText.Get("Shop_0057", gachaInfo.Cost.ToString());
_iconTicket.gameObject.SetActive(value: true);
_iconTicket.mainTexture = Toolbox.ResourcesManager.LoadObject(packConfig.GetPackIconTexturePath(isFetch: true)) as Texture;
break;
case GachaUI.CardPackType.RUPY_MULTI:
_buttonPurchase.normalSprite = "btn_input_01_off";
_buttonPurchase.pressedSprite = "btn_input_01_on";
_labelCostNamePurchaseBtn.text = systemText.Get("Shop_0062");
_labelHaveItemName.text = systemText.Get("Shop_0065");
_labelHaveNumItems.text = PlayerStaticData.UserRupyCount.ToString();
_labelCostPerPack.text = systemText.Get("Shop_0059", gachaInfo.Cost.ToString());
_iconRupy.gameObject.SetActive(value: true);
break;
case GachaUI.CardPackType.CRYSTAL_MULTI:
_buttonPurchase.normalSprite = "btn_input_03_off";
_buttonPurchase.pressedSprite = "btn_input_03_on";
_labelCostNamePurchaseBtn.text = systemText.Get("Shop_0061");
_labelHaveItemName.text = systemText.Get("Shop_0064");
_labelHaveNumItems.text = PlayerStaticData.UserCrystalCount.ToString();
_labelCostPerPack.text = systemText.Get("Shop_0058", gachaInfo.Cost.ToString());
_iconCrystal.gameObject.SetActive(value: true);
break;
case GachaUI.CardPackType.CRYSTAL_SPECIAL:
_buttonPurchase.normalSprite = "btn_input_03_off";
_buttonPurchase.pressedSprite = "btn_input_03_on";
_labelCostNamePurchaseBtn.text = systemText.Get("Shop_0061");
_labelHaveItemName.text = systemText.Get("Shop_0064");
_labelHaveNumItems.text = PlayerStaticData.UserCrystalCount.ToString();
_labelCostPerPack.text = systemText.Get("Shop_0112", gachaInfo.Cost.ToString());
_iconCrystal.gameObject.SetActive(value: true);
break;
case GachaUI.CardPackType.DAILY:
case GachaUI.CardPackType.TICKET:
case GachaUI.CardPackType.RUPY:
break;
}
}
public void SetTutorialGuide()
{
MyPageMenu.Instance.SetGuideEffect(_buttonPurchase.transform, new Vector3(-80f, 0f, 0f), -90f);
}
}

View File

@@ -1,56 +0,0 @@
namespace Wizard;
public class GachaUtil
{
public static string GetRewardListGoodsTypeName(UserGoods userGoods)
{
switch (userGoods.GoodsType)
{
case UserGoods.Type.Sleeve:
if (!Data.Master.SleeveMgr.Get(userGoods.Id).IsPremiumSleeve)
{
return Data.SystemText.Get("Shop_0227");
}
return Data.SystemText.Get("Shop_0230");
case UserGoods.Type.Emblem:
return Data.SystemText.Get("Shop_0228");
case UserGoods.Type.Degree:
if (!Data.Master.DegreeMgr.Get((int)userGoods.Id).IsPremium)
{
return Data.SystemText.Get("Shop_0231");
}
return Data.SystemText.Get("Shop_0250");
case UserGoods.Type.Skin:
return Data.SystemText.Get("Shop_0229");
case UserGoods.Type.MyPageBG:
return Data.SystemText.Get("MyPage_0102");
default:
Debug.LogError($"unsupported UserGoods.Type : {userGoods.GoodsType}");
return string.Empty;
}
}
public static int GetRewardListSortIndex(UserGoods userGoods)
{
switch (userGoods.GoodsType)
{
case UserGoods.Type.Sleeve:
if (!Data.Master.SleeveMgr.Get(userGoods.Id).IsPremiumSleeve)
{
return 2;
}
return 3;
case UserGoods.Type.Emblem:
return 1;
case UserGoods.Type.Degree:
return 4;
case UserGoods.Type.Skin:
return 0;
case UserGoods.Type.MyPageBG:
return 5;
default:
Debug.LogError($"unsupported UserGoods.Type : {userGoods.GoodsType}");
return int.MaxValue;
}
}
}

View File

@@ -1,54 +0,0 @@
using System.Collections.Generic;
using LitJson;
namespace Wizard;
public class GetSelectSkinOwnedStatusTask : BaseTask
{
public class SelectSkinCardListTaskParam : BaseParam
{
public int parent_gacha_id;
}
public Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>> SkinCardListInClassDic { get; private set; }
public GetSelectSkinOwnedStatusTask()
{
base.type = ApiType.Type.GetSelectSkinOwnedStatus;
}
public void SetParameter(int packId)
{
SelectSkinCardListTaskParam selectSkinCardListTaskParam = new SelectSkinCardListTaskParam();
selectSkinCardListTaskParam.parent_gacha_id = packId;
base.Params = selectSkinCardListTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
JsonData jsonData = base.ResponseData["data"];
SkinCardListInClassDic = new Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>>();
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.MIN; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
SkinCardListInClassDic[clanType] = new List<SelectSkinCardInfo>();
int num2 = (int)clanType;
JsonData jsonData2 = jsonData[num2.ToString()];
if (jsonData2.Count != 0)
{
List<string> list = new List<string>(jsonData2.Keys);
for (int i = 0; i < list.Count; i++)
{
string prop_name = list[i];
SelectSkinCardInfo item = new SelectSkinCardInfo(jsonData2[prop_name], clanType);
SkinCardListInClassDic[clanType].Add(item);
}
}
}
return num;
}
}

View File

@@ -1,48 +0,0 @@
using System;
namespace Wizard;
public static class LootBoxDialogUtility
{
public static void CreateLootBoxRegulationDialog(PlayerStaticData.LootBoxType type)
{
string key;
string key2;
switch (type)
{
default:
return;
case PlayerStaticData.LootBoxType.GACHA:
key = "Dia_LootBox_002_Title";
key2 = "Dia_LootBox_002_Body";
break;
case PlayerStaticData.LootBoxType.TWOPICK:
key = "Dia_LootBox_003_Title";
key2 = "Dia_LootBox_003_Body";
break;
case PlayerStaticData.LootBoxType.SEALED:
key = "Dia_LootBox_Sealed_Title";
key2 = "Dia_LootBox_Sealed_Body";
break;
case PlayerStaticData.LootBoxType.COLOSSEUM:
key = "Dia_LootBox_004_Title";
key2 = "Dia_LootBox_004_Body";
break;
case PlayerStaticData.LootBoxType.COMPETITION:
key = "Dia_LootBox_Competition_Title";
key2 = "Dia_LootBox_Competition_Body";
break;
case PlayerStaticData.LootBoxType.SPECIAL_CRYSTAL:
key = "Dia_LootBox_005_Title";
key2 = "Dia_LootBox_005_Body";
break;
}
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetSize(DialogBase.Size.S);
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
dialogBase.SetPanelDepth(3000);
dialogBase.SetTitleLabel(Data.SystemText.Get(key));
dialogBase.SetText(Data.SystemText.Get(key2));
}
}

View File

@@ -46,64 +46,4 @@ public class NotificatonAnimation : MonoBehaviour
_labelInitialPos = _labels[0].transform.localPosition; _labelInitialPos = _labels[0].transform.localPosition;
_root.SetActive(value: false); _root.SetActive(value: false);
} }
public IEnumerator Exec(List<Param> paramList)
{
if (paramList.Count <= 0)
{
yield break;
}
_root.SetActive(value: true);
_root.transform.localPosition = _rootInitialPos + Vector3.up * 100f;
for (int i = 0; i < _labels.Length; i++)
{
_labels[i].transform.localPosition = _labelInitialPos + Vector3.right * 2000f;
}
iTween.MoveTo(_root, iTween.Hash("position", _rootInitialPos, "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo));
yield return new WaitForSeconds(0.5f);
int labelIndex = 0;
int i2 = 0;
while (i2 < paramList.Count)
{
Param param = paramList[i2];
UILabel usingLabel = _labels[labelIndex];
usingLabel.text = param._text;
usingLabel.transform.localPosition = _labelInitialPos + Vector3.right * 2000f;
iTween.MoveTo(usingLabel.gameObject, iTween.Hash("position", _labelInitialPos, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo));
float seconds = 0f;
switch (param._type)
{
case Param.Type.Result:
seconds = 1.4f;
break;
case Param.Type.MaintenanceOnHome:
seconds = 4f;
break;
case Param.Type.MaintenanceOnResult:
seconds = 4f;
break;
case Param.Type.GatheringMatching:
seconds = 2f;
break;
case Param.Type.GachaResult:
seconds = 1.4f;
break;
case Param.Type.TemporaryDeckResult:
seconds = 1.4f;
break;
case Param.Type.MissionCleared:
seconds = 1.4f;
break;
}
yield return new WaitForSeconds(seconds);
iTween.MoveTo(usingLabel.gameObject, iTween.Hash("position", _labelInitialPos + Vector3.left * 2000f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo));
yield return new WaitForSeconds(0.3f);
int num = labelIndex + 1;
labelIndex = num % _labels.Length;
num = i2 + 1;
i2 = num;
}
iTween.MoveTo(_root, iTween.Hash("position", _rootInitialPos + Vector3.up * 100f, "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo));
yield return new WaitForSeconds(1f);
}
} }

View File

@@ -2,7 +2,4 @@ namespace Wizard;
public class PackBannerData public class PackBannerData
{ {
public string BannerFileName { get; set; }
public string BannerTitle { get; set; }
} }

View File

@@ -3,8 +3,6 @@ namespace Wizard;
public class PackChildGachaInfo public class PackChildGachaInfo
{ {
public int GachaId { get; set; }
public GachaUI.CardPackType PackType { get; set; } public GachaUI.CardPackType PackType { get; set; }
public int Cost { get; set; } public int Cost { get; set; }
@@ -13,61 +11,7 @@ public class PackChildGachaInfo
public int CostGoodsCount => PlayerStaticData.GetItemNum((int)UserGoodsId); public int CostGoodsCount => PlayerStaticData.GetItemNum((int)UserGoodsId);
public bool IsDailySingle { get; set; }
public int AvailableCount { get; set; } public int AvailableCount { get; set; }
public int PackCountBuyPer { get; set; }
public string CampaignName { get; set; }
public int OverrideIncreaseGachaPoint { get; set; }
public int? FreeGachaCampaignId { get; set; } public int? FreeGachaCampaignId { get; set; }
public bool IsShowAnniversaryIcon
{
get
{
if (FreeGachaCampaignId != 15 && FreeGachaCampaignId != 16 && FreeGachaCampaignId != 24)
{
return FreeGachaCampaignId == 25;
}
return true;
}
}
public string AnniversaryIconSpriteName
{
get
{
switch (FreeGachaCampaignId)
{
case 15:
case 16:
return "icon_7th";
case 24:
case 25:
return "icon_8th";
default:
return string.Empty;
}
}
}
public bool IsShowPinkRibbon
{
get
{
if (FreeGachaCampaignId != 16)
{
return FreeGachaCampaignId == 25;
}
return true;
}
}
public bool IsShowWinterUI => FreeGachaCampaignId == 50;
public bool IsFreePack => PackType == GachaUI.CardPackType.FREE_PACKS;
} }

View File

@@ -10,46 +10,16 @@ public class PackConfig
public int PackId { get; set; } public int PackId { get; set; }
public int BasePackId { get; set; }
public int GachaType { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public int SleeveId { get; set; } public int SleeveId { get; set; }
public int SpecialSleeveId { get; set; } public int SpecialSleeveId { get; set; }
public PackCategory Category { get; set; } public PackCategory Category { get; set; }
public int OverrideDrawEffectPackId { get; set; }
public int OverrideUIEffectPackId { get; set; } public int OverrideUIEffectPackId { get; set; }
public bool IsHideNotEnoughBuy { get; set; }
public int OpenCount { get; set; }
public int OpenCountLimit { get; set; }
public RemainTime RemainTime { get; set; }
public int RemainStepupOpenCount { get; set; }
public int TotalStepupOpenCount { get; set; }
public bool IsNew { get; set; }
public int TsExchangePosterId { get; set; } public int TsExchangePosterId { get; set; }
public List<PackBannerData> ListPackBanner { get; } = new List<PackBannerData>();
public GachaPointData GachaPointData { get; set; }
public int SelectedClassId { get; set; } = 10;
public bool IsSpecialLayout public bool IsSpecialLayout
{ {
get get
@@ -62,24 +32,6 @@ public class PackConfig
} }
} }
public bool IsUseLongPoster => IsSpecialLayout;
public bool IsUsePackPointLayout
{
get
{
if (IsSpecialLayout)
{
return false;
}
if (IsPrerelease)
{
return false;
}
return true;
}
}
public bool IsSpecialCardPack public bool IsSpecialCardPack
{ {
get get
@@ -92,34 +44,12 @@ public class PackConfig
} }
} }
public bool IsNeedRemainTime
{
get
{
if (!IsSpecialCardPack && Category != PackCategory.FreePackLeaderSkin && Category != PackCategory.LeaderSkinPack)
{
return Category == PackCategory.LegendAndLeaderSkinSinglePack;
}
return true;
}
}
public bool IsLegendCardPack => Category == PackCategory.LegendCardPack; public bool IsLegendCardPack => Category == PackCategory.LegendCardPack;
public bool IsRotationStarterCardPack => Category == PackCategory.RotationStarterCardPack;
public bool IsShowAppealImage => Category == PackCategory.LeaderSkinPack;
public bool IsPrerelease { get; set; } public bool IsPrerelease { get; set; }
public PrereleasePurchaseInfo PrereleasePurchaseInfo { get; set; }
public bool IsExistSpecialPackPurchaseRewards => SpecialPackRewardsList != null;
public List<PurchaseRewardInfo> SpecialPackRewardsList { get; private set; } public List<PurchaseRewardInfo> SpecialPackRewardsList { get; private set; }
public ShopExpirtyInfo ExpirtyInfo { get; set; }
public int GetGachaIdForUIResource() public int GetGachaIdForUIResource()
{ {
if (!IsSpecialCardPack) if (!IsSpecialCardPack)
@@ -129,87 +59,6 @@ public class PackConfig
return OverrideUIEffectPackId; return OverrideUIEffectPackId;
} }
public void SetSpecialPackRewardsList(JsonData parentJsonData)
{
if (!parentJsonData.Keys.Contains("gacha_purchase_reward"))
{
return;
}
SpecialPackRewardsList = new List<PurchaseRewardInfo>();
JsonData jsonData = parentJsonData["gacha_purchase_reward"];
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 shopCommonRewardInfo = new ShopCommonRewardInfo();
shopCommonRewardInfo.Type = jsonData3[j]["reward_type"].ToInt();
shopCommonRewardInfo.UserGoodsId = jsonData3[j]["reward_detail_id"].ToLong();
shopCommonRewardInfo.Num = jsonData3[j]["reward_number"].ToInt();
purchaseRewardInfo.RewardInfoList.Add(shopCommonRewardInfo);
}
int num = jsonData2["purchase_count"].ToInt() / 10;
purchaseRewardInfo.PurchaseNthText = Data.SystemText.Get("Shop_0186", num.ToString());
purchaseRewardInfo.IsGet = jsonData2["is_received"].ToBoolean();
SpecialPackRewardsList.Add(purchaseRewardInfo);
}
}
public string GetPackPosterTexturePath(bool isFetch)
{
int gachaIdForUIResource = GetGachaIdForUIResource();
string path = (IsPrerelease ? $"card_pack_{gachaIdForUIResource}_poster_pre" : ((TsExchangePosterId <= 0) ? $"card_pack_{gachaIdForUIResource}_poster" : $"card_pack_{gachaIdForUIResource}_poster_{TsExchangePosterId}"));
return Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isFetch);
}
public string GetPackBounsPosterTexturePath(bool isFetch)
{
string path = $"card_pack_{GetGachaIdForUIResource()}_poster_bonus";
return Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isFetch);
}
public string GetPackTitleLogoTexturePath(bool isFetch)
{
int gachaIdForUIResource = GetGachaIdForUIResource();
string path = ((!IsPrerelease) ? $"card_pack_{gachaIdForUIResource}_logo_01" : $"card_pack_{gachaIdForUIResource}_logo_01_pre");
return Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isFetch);
}
public string GetPackIconTexturePath(bool isFetch)
{
int ticketId = GetTicketId();
string path = $"card_pack_{ticketId}_icon";
return Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isFetch);
}
public string GetPackDrumrollLogoTexturePath(bool isFetch)
{
int gachaIdForUIResource = GetGachaIdForUIResource();
string path = $"card_pack_{gachaIdForUIResource}_logo_02";
return Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ShopCardPack, isFetch);
}
public bool EnableBuyPack()
{
bool result = false;
for (int i = 0; i < ChildGachaInfoList.Count; i++)
{
if ((ChildGachaInfoList[i].PackType == GachaUI.CardPackType.FREE_PACK_WITH_SKIN || ChildGachaInfoList[i].PackType == GachaUI.CardPackType.FREE_PACKS) && ChildGachaInfoList[i].AvailableCount > 0)
{
result = true;
break;
}
if (ChildGachaInfoList[i].CostGoodsCount > 0)
{
result = true;
break;
}
}
return result;
}
public int GetTicketId() public int GetTicketId()
{ {
int result = PackId; int result = PackId;
@@ -220,16 +69,4 @@ public class PackConfig
} }
return result; return result;
} }
public PackChildGachaInfo CanFreeBuyInfo()
{
foreach (PackChildGachaInfo childGachaInfo in ChildGachaInfoList)
{
if (childGachaInfo.PackType == GachaUI.CardPackType.FREE_PACKS)
{
return childGachaInfo;
}
}
return null;
}
} }

View File

@@ -5,6 +5,4 @@ namespace Wizard;
public class PackInfo : HeaderData public class PackInfo : HeaderData
{ {
private List<PackConfig> m_dataList = new List<PackConfig>(); private List<PackConfig> m_dataList = new List<PackConfig>();
public List<PackConfig> dataList => m_dataList;
} }

View File

@@ -1,173 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LitJson;
namespace Wizard;
public class PackInfoTask : BaseTask
{
public class PackFirstTransition
{
private int _serialId;
public int PackId { get; private set; }
public PackFirstTransition(int serialId, int packId)
{
_serialId = serialId;
PackId = packId;
}
public bool IsUpdate()
{
int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.PACK_FIRST_TRANSITION_SERIAL_ID);
return _serialId != value;
}
public void SaveViewed()
{
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.PACK_FIRST_TRANSITION_SERIAL_ID, _serialId);
}
}
public class PackInfoTaskParam : BaseParam
{
}
public bool NeedsFooterBadgeIcon;
public PackFirstTransition PackFirstTransitionData { get; private set; }
public PackInfoTask(ApiType.Type apiType)
{
base.type = apiType;
}
public void SetParameter()
{
PackInfoTaskParam packInfoTaskParam = new PackInfoTaskParam();
base.Params = packInfoTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
Data.PackInfo.dataList.Clear();
JsonData jsonData = base.ResponseData["data"]["pack_config_list"];
for (int i = 0; i < jsonData.Count; i++)
{
JsonData jsonData2 = jsonData[i];
PackConfig packConfig = new PackConfig();
packConfig.PackId = jsonData2["parent_gacha_id"].ToInt();
packConfig.BasePackId = jsonData2["base_pack_id"].ToInt();
packConfig.GachaType = jsonData2["gacha_type"].ToInt();
packConfig.ExpirtyInfo = new ShopExpirtyInfo(jsonData2["sales_period_info"]);
if (jsonData2["gacha_detail"] != null)
{
string text = jsonData2["gacha_detail"].ToString();
packConfig.Description = text.Replace("\\n", "\n");
}
packConfig.Category = (PackCategory)Enum.ToObject(typeof(PackCategory), jsonData2["pack_category"].ToInt());
packConfig.RemainTime = new RemainTime(jsonData2["complete_date"].ToString(), base.ResponseData["data_headers"]["servertime"].ToDouble());
packConfig.IsHideNotEnoughBuy = jsonData2["is_hide"].ToBoolean();
packConfig.OpenCount = jsonData2["open_count"].ToInt();
packConfig.OpenCountLimit = jsonData2["open_count_limit"].ToInt();
if (jsonData2.TryGetValue("selected_class_id", out var value))
{
packConfig.SelectedClassId = value.ToInt();
}
if (jsonData2.TryGetValue("set_number", out var value2))
{
packConfig.RemainStepupOpenCount = value2.ToInt();
}
if (jsonData2.TryGetValue("total_set_number", out var value3))
{
packConfig.TotalStepupOpenCount = value3.ToInt();
}
int num2 = ((packConfig.IsSpecialCardPack && packConfig.PackId >= 90001 && !GachaUI.IsTsStepupPackId(packConfig.PackId)) ? 90002 : packConfig.PackId);
packConfig.Title = Data.Master.CardSetNameMgr.Get(num2.ToString()).LongName;
if (jsonData2.Keys.Contains("sleeve_id"))
{
packConfig.SleeveId = jsonData2["sleeve_id"].ToInt();
}
else
{
packConfig.SleeveId = 3000011;
}
packConfig.SpecialSleeveId = (jsonData2.Keys.Contains("special_sleeve_id") ? jsonData2["special_sleeve_id"].ToInt() : 3000011);
if (jsonData2["override_draw_effect_pack_id"] != null)
{
packConfig.OverrideDrawEffectPackId = jsonData2["override_draw_effect_pack_id"].ToInt();
}
if (jsonData2["override_ui_effect_pack_id"] != null)
{
packConfig.OverrideUIEffectPackId = jsonData2["override_ui_effect_pack_id"].ToInt();
}
packConfig.TsExchangePosterId = jsonData2.GetValueOrDefault("poster_type", 0);
JsonData jsonData3 = jsonData2["cardpack_banner_list"];
for (int j = 0; j < jsonData3.Count; j++)
{
PackBannerData packBannerData = new PackBannerData();
packBannerData.BannerFileName = jsonData3[j]["banner_name"].ToString();
packBannerData.BannerTitle = Data.SystemText.Get(jsonData3[j]["dialog_title"].ToString());
packConfig.ListPackBanner.Add(packBannerData);
}
if (jsonData2["gacha_point"] != null)
{
packConfig.GachaPointData = new GachaPointData(jsonData2["gacha_point"]);
}
packConfig.IsNew = jsonData2["is_new"].ToBoolean();
JsonData jsonData4 = jsonData2["child_gacha_info"];
for (int k = 0; k < jsonData4.Count; k++)
{
JsonData jsonData5 = jsonData4[k];
PackChildGachaInfo packChildGachaInfo = new PackChildGachaInfo();
packChildGachaInfo.GachaId = jsonData5["gacha_id"].ToInt();
packChildGachaInfo.PackType = (GachaUI.CardPackType)jsonData5["type_detail"].ToInt();
packChildGachaInfo.Cost = jsonData5["cost"].ToInt();
if (jsonData5.Keys.Contains("item_id"))
{
packChildGachaInfo.UserGoodsId = jsonData5["item_id"].ToLong();
}
if (jsonData5.Keys.Contains("is_daily_single"))
{
packChildGachaInfo.IsDailySingle = jsonData5["is_daily_single"].ToBoolean();
}
else
{
packChildGachaInfo.IsDailySingle = false;
}
packChildGachaInfo.PackCountBuyPer = jsonData5.GetValueOrDefault("daily_free_gacha_count", 0);
packChildGachaInfo.CampaignName = jsonData5.GetValueOrDefault("campaign_name", "");
packChildGachaInfo.AvailableCount = jsonData5.GetValueOrDefault("purchase_limit_count", 0);
packChildGachaInfo.OverrideIncreaseGachaPoint = jsonData5.GetValueOrDefault("override_increase_gacha_point", 0);
if (jsonData5.Keys.Contains("free_gacha_campaign_id"))
{
packChildGachaInfo.FreeGachaCampaignId = jsonData5["free_gacha_campaign_id"].ToInt();
}
packConfig.ChildGachaInfoList.Add(packChildGachaInfo);
}
packConfig.IsPrerelease = jsonData2["is_pre_release"].ToBoolean();
if (packConfig.IsPrerelease)
{
packConfig.PrereleasePurchaseInfo = new PrereleasePurchaseInfo(jsonData2["pre_release_gacha_info"], base.ResponseData["data_headers"]["servertime"].ToDouble());
}
packConfig.SetSpecialPackRewardsList(jsonData2);
Data.PackInfo.dataList.Add(packConfig);
}
if (base.ResponseData["data"].Keys.Contains("pack_first_transition_data"))
{
JsonData jsonData6 = base.ResponseData["data"]["pack_first_transition_data"];
int serialId = jsonData6["serial_id"].ToInt();
int packId = jsonData6["pack_id"].ToInt();
PackFirstTransitionData = new PackFirstTransition(serialId, packId);
}
NeedsFooterBadgeIcon = Data.PackInfo.dataList.Any((PackConfig config) => config.ChildGachaInfoList.Any((PackChildGachaInfo child) => child.AvailableCount > 0));
return num;
}
}

View File

@@ -61,41 +61,6 @@ public class PackOpenTask : BaseTask
_packConfig = packConfig; _packConfig = packConfig;
} }
public void SetParameter(int parent_gacha_id, int gacha_id, int gacha_type, int pack_number, int[] excluedeCardIds)
{
PackOpenTaskParam packOpenTaskParam = new PackOpenTaskParam();
packOpenTaskParam.parent_gacha_id = parent_gacha_id;
packOpenTaskParam.gacha_id = gacha_id;
packOpenTaskParam.gacha_type = gacha_type;
packOpenTaskParam.pack_number = pack_number;
packOpenTaskParam.exclude_card_ids = excluedeCardIds;
base.Params = packOpenTaskParam;
}
public void SetStarterPackParameter(int parent_gacha_id, int gacha_id, int gacha_type, int pack_number, int[] excluedeCardIds, int classId)
{
PackOpenStarterPackTaskParam packOpenStarterPackTaskParam = new PackOpenStarterPackTaskParam();
packOpenStarterPackTaskParam.parent_gacha_id = parent_gacha_id;
packOpenStarterPackTaskParam.gacha_id = gacha_id;
packOpenStarterPackTaskParam.gacha_type = gacha_type;
packOpenStarterPackTaskParam.pack_number = pack_number;
packOpenStarterPackTaskParam.exclude_card_ids = excluedeCardIds;
packOpenStarterPackTaskParam.class_id = classId;
base.Params = packOpenStarterPackTaskParam;
}
public void SetAcquireSkinCardPackParameter(int parentGachaId, int gachaId, int gachaType, int packNumber, int targetCardId)
{
PackOpenAcquireSkinCardPackTaskParam packOpenAcquireSkinCardPackTaskParam = new PackOpenAcquireSkinCardPackTaskParam();
packOpenAcquireSkinCardPackTaskParam.parent_gacha_id = parentGachaId;
packOpenAcquireSkinCardPackTaskParam.gacha_id = gachaId;
packOpenAcquireSkinCardPackTaskParam.gacha_type = gachaType;
packOpenAcquireSkinCardPackTaskParam.pack_number = packNumber;
packOpenAcquireSkinCardPackTaskParam.exclude_card_ids = new int[0];
packOpenAcquireSkinCardPackTaskParam.target_card_id = targetCardId;
base.Params = packOpenAcquireSkinCardPackTaskParam;
}
protected override int Parse() protected override int Parse()
{ {
int num = base.Parse(); int num = base.Parse();

View File

@@ -1,31 +0,0 @@
namespace Wizard;
public class PackSetRotationStarterClassTask : BaseTask
{
public class PackSetRotationStarterClassTaskParam : BaseParam
{
public int pack_id;
public int class_id;
}
public PackSetRotationStarterClassTask()
{
base.type = ApiType.Type.PackSetRotationStarterClass;
}
public void SetParameter(int packId, int classId)
{
PackSetRotationStarterClassTaskParam packSetRotationStarterClassTaskParam = new PackSetRotationStarterClassTaskParam();
packSetRotationStarterClassTaskParam.pack_id = packId;
packSetRotationStarterClassTaskParam.class_id = classId;
base.Params = packSetRotationStarterClassTaskParam;
}
protected override int Parse()
{
int result = base.Parse();
_ = 1;
return result;
}
}

View File

@@ -212,12 +212,10 @@ public class PlayerStaticData : MonoBehaviour
public enum LootBoxType public enum LootBoxType
{ {
GACHA,
TWOPICK, TWOPICK,
SEALED, SEALED,
COLOSSEUM, COLOSSEUM,
COMPETITION, COMPETITION}
SPECIAL_CRYSTAL }
public static AgreementState _tosAgreementState = AgreementState.NotAgree; public static AgreementState _tosAgreementState = AgreementState.NotAgree;
@@ -347,11 +345,6 @@ public class PlayerStaticData : MonoBehaviour
} }
} }
public static bool IsLootBoxRegulation(LootBoxType type)
{
return Data.Load.data.LootBoxReguration[(int)type];
}
public static int GetItemNum(int itemId) public static int GetItemNum(int itemId)
{ {
if (Data.Load.data._userItemDict == null) if (Data.Load.data._userItemDict == null)
@@ -483,28 +476,4 @@ public class PlayerStaticData : MonoBehaviour
break; break;
} }
} }
public static int GetHaveUserGoods(UserGoods.Type type, long userGoodsId)
{
int result = 0;
switch (type)
{
case UserGoods.Type.RedEther:
result = UserRedEtherCount;
break;
case UserGoods.Type.Crystal:
result = UserCrystalCount;
break;
case UserGoods.Type.Item:
result = GetItemNum((int)userGoodsId);
break;
case UserGoods.Type.Rupy:
result = UserRupyCount;
break;
case UserGoods.Type.SpotCardPoint:
result = UserSpotCardPointCount;
break;
}
return result;
}
} }

View File

@@ -18,22 +18,10 @@ public class PrereleasePurchaseInfo
public int TicketRupyCountLimit { get; private set; } public int TicketRupyCountLimit { get; private set; }
public int TicketRupyCountRemain
{
get
{
int a = LimitCount - CurrentCount;
int b = TicketRupyCountLimit - TicketRupyCountCurrent;
return Mathf.Min(a, b);
}
}
public RemainTime RemainTime { get; private set; } public RemainTime RemainTime { get; private set; }
public List<PurchaseRewardInfo> RewardsList { get; private set; } public List<PurchaseRewardInfo> RewardsList { get; private set; }
public bool IsCountLimitedPrerelease => LimitCount != 0;
public PrereleasePurchaseInfo(JsonData json, double serverTime) public PrereleasePurchaseInfo(JsonData json, double serverTime)
{ {
CurrentCount = json["purchase_count"].ToInt(); CurrentCount = json["purchase_count"].ToInt();
@@ -66,9 +54,4 @@ public class PrereleasePurchaseInfo
RewardsList.Add(purchaseRewardInfo); RewardsList.Add(purchaseRewardInfo);
} }
} }
public int GetAbleBuyPackNum()
{
return LimitCount - CurrentCount;
}
} }

View File

@@ -134,20 +134,6 @@ public class PurchaseConfirm : MonoBehaviour
HideJpnLawObj(); HideJpnLawObj();
} }
public void ChangePurchaceConfirmTextWidth()
{
}
public void SetTicketConfirmDialog(int useItemNum, string purchaseText, int haveItemCnt, Texture icon)
{
SetIconImage(UserGoods.Type.Item, Item.Type.CardPackTicket, icon);
int afterItemNum = haveItemCnt - useItemNum;
string unit = Data.SystemText.Get("Common_0117");
string useItemNumText = Data.SystemText.Get("Shop_0042", useItemNum.ToString());
SetLabelText(Data.SystemText.Get("Common_0114"), useItemNumText, afterItemNum, unit, purchaseText, haveItemCnt);
HideJpnLawObj();
}
public void SetRupyConfirmDialog(int useItemNum, string purchaseText, int haveItemCnt) public void SetRupyConfirmDialog(int useItemNum, string purchaseText, int haveItemCnt)
{ {
SetIconImage(UserGoods.Type.Rupy); SetIconImage(UserGoods.Type.Rupy);
@@ -373,63 +359,6 @@ public class PurchaseConfirm : MonoBehaviour
_haveObj.transform.localPosition = new Vector3(0f, -40f, 0f); _haveObj.transform.localPosition = new Vector3(0f, -40f, 0f);
} }
public IEnumerator SetCardPackPoint(int beforePoint, int afterPoint)
{
_tablePackPoint.gameObject.SetActive(value: true);
_labelBeforPackPoint.text = beforePoint.ToString();
_labelAfterPackPoint.text = afterPoint.ToString();
_confirmObj.transform.localPosition = new Vector3(0f, -32f, 0f);
_haveObj.transform.localPosition = new Vector3(0f, 0f, 0f);
if (_nonItemRoot != null)
{
_nonItemRoot.localPosition = new Vector3(0f, -12f, 0f);
}
yield return null;
_tablePackPoint.Reposition();
}
public IEnumerator SetCardPackPointWithPreRelease(int beforePoint, int afterPoint, int beforePrereleasePoint, int afterPrereleasePoint, bool arleadyLimitPreReleasePoint)
{
_tablePackPoint.gameObject.SetActive(value: true);
_labelBeforPackPoint.text = beforePoint.ToString();
_labelAfterPackPoint.text = afterPoint.ToString();
_preReleasePointArleadyMax.SetActive(arleadyLimitPreReleasePoint);
if (!arleadyLimitPreReleasePoint)
{
_preReleasePointTable.gameObject.SetActive(value: true);
}
_preReleasePointBeforeLabel.text = beforePrereleasePoint.ToString();
_preReleasePointAfterlabel.text = afterPrereleasePoint.ToString();
_confirmObj.transform.localPosition = new Vector3(0f, -32f, 0f);
_haveObj.transform.localPosition = new Vector3(0f, 0f, 0f);
_tablePackPoint.transform.localPosition = new Vector3(0f, -60f, 0f);
yield return null;
_tablePackPoint.Reposition();
_preReleasePointTable.Reposition();
}
public void SetFreePacksConfirmDialog(string purchaseText, int useNum, int beforeCount, int buyPackCount, string campaignName)
{
HideIcon();
m_LabelUseItemCnt.text = string.Empty;
m_LabelBuyPack.text = purchaseText;
_haveObj.SetActive(value: false);
_nonItemRoot.gameObject.SetActive(value: true);
_nonItemBeforeCountLabel.text = (beforeCount / buyPackCount).ToString();
_nonItemAfterCountLabel.text = ((beforeCount - useNum) / buyPackCount).ToString();
_nonItemRemainingLabel.text = Data.SystemText.Get("Shop_0224");
_nonItemUnitLabel.text = Data.SystemText.Get("Shop_0221");
_nonItemCentering.Reposition();
HideJpnLawObj();
SetCampaignName(campaignName);
}
public void SetFreePacksLayout()
{
_confirmObj.transform.localPosition = new Vector3(0f, -45f, 0f);
_nonItemRoot.localPosition = new Vector3(0f, -24f, 0f);
}
private void SetCampaignName(string name) private void SetCampaignName(string name)
{ {
if (!(_campaignNameLabel == null)) if (!(_campaignNameLabel == null))

View File

@@ -1,404 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class PurchaseRewardDialog : MonoBehaviour
{
public enum Layout
{
NORMAL,
TITLE_BOTTOM,
TITLE_BOTTOM_LARGE_FONT
}
private readonly Vector3 CARDOBJECT_COLLIDER_SIZE = new Vector3(175f, 230f, 1f);
[SerializeField]
private UIGrid _itemGrid;
[SerializeField]
private GameObject _purchaseRewardItemOriginal;
[SerializeField]
private int _rewardNumParPage;
[SerializeField]
private UIButton _btnPrevPage;
[SerializeField]
private UIButton _btnNextPage;
[SerializeField]
private BoxCollider _flickCollider;
[SerializeField]
private UIPageIndicator _indicator;
[SerializeField]
private GameObject _centerLine;
[SerializeField]
private GameObject _attachPointBottom;
private int _currentPageIndex = 1;
private int _lastPageIndex = 1;
private bool _flickStart;
private List<GameObject> _rewardObjectsList = new List<GameObject>();
private List<UIBase_CardManager.CardObjData> _cardObjList;
private CardDetailUI _cardDetail;
protected List<string> _loadedResourceList = new List<string>();
private string _detailDialogTitleOverride;
private DialogBase _dialog;
private Layout _layout;
private bool IsFirstPage => _currentPageIndex <= 1;
private bool IsLastPage => _currentPageIndex >= _lastPageIndex;
private static string GetPrefabPath(List<PurchaseRewardInfo> purchaseRewardsList, Layout layout)
{
switch (layout)
{
case Layout.TITLE_BOTTOM_LARGE_FONT:
return "UI/layoutParts/Dialog/PurchaseRewardDialogTitleBottomLargeFont";
case Layout.TITLE_BOTTOM:
if (purchaseRewardsList.Count < 10)
{
return "UI/layoutParts/Dialog/PurchaseRewardDialogTitleBottom";
}
return "UI/layoutParts/Dialog/PurchaseRewardDialog10TitleBottom";
default:
if (purchaseRewardsList.Count < 10)
{
return "UI/layoutParts/Dialog/PurchaseRewardDialog";
}
return "UI/layoutParts/Dialog/PurchaseRewardDialog10";
}
}
public static DialogBase Create(List<PurchaseRewardInfo> purchaseRewardsList, CardDetailUI cardDetail, bool useLargeDetailDialog, Layout layout, GameObject attachBottomObj = null, string detailDialogTitleOverride = null, bool isPaging = false)
{
PurchaseRewardDialog component = (UnityEngine.Object.Instantiate(Resources.Load(GetPrefabPath(purchaseRewardsList, layout))) as GameObject).GetComponent<PurchaseRewardDialog>();
component.CreateDialog();
component.Initialize(purchaseRewardsList, cardDetail, useLargeDetailDialog, attachBottomObj, detailDialogTitleOverride, isPaging, layout);
return component._dialog;
}
private void CreateDialog()
{
_dialog = UIManager.GetInstance().CreateDialogClose();
_dialog.SetSize(DialogBase.Size.M);
_dialog.SetTitleLabel(Data.SystemText.Get("Shop_0142"));
_dialog.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn);
_dialog.SetObj(base.gameObject);
}
private void Initialize(List<PurchaseRewardInfo> purchaseRewardsList, CardDetailUI cardDetail, bool useLargeDetailDialog, GameObject attachBottomObj, string detailDialogTitleOverride, bool isPaging, Layout layout)
{
_detailDialogTitleOverride = detailDialogTitleOverride;
_layout = layout;
if (attachBottomObj != null)
{
attachBottomObj.transform.parent = _attachPointBottom.transform;
attachBottomObj.transform.localPosition = Vector3.zero;
attachBottomObj.transform.localScale = Vector3.one;
}
_cardDetail = cardDetail;
InitializePage(purchaseRewardsList);
UIManager.GetInstance().createInSceneCenterLoading();
StartCoroutine(LoadResources(purchaseRewardsList, delegate
{
SetRewards(purchaseRewardsList, useLargeDetailDialog, isPaging);
ShowPage(_currentPageIndex);
UIManager.GetInstance().closeInSceneCenterLoading();
}));
}
private void SetRewards(List<PurchaseRewardInfo> purchaseRewardsList, bool useLargeDetailDialog, bool isPaging)
{
int count = purchaseRewardsList.Count;
for (int i = 0; i < count; i++)
{
GameObject gameObject = NGUITools.AddChild(_itemGrid.gameObject, _purchaseRewardItemOriginal.gameObject);
PurchaseRewardInfo purchaseRewardInfo = purchaseRewardsList[i];
ShopCommonRewardInfo shopCommonRewardInfo = purchaseRewardInfo.RewardInfoList[0];
PurchaseRewardItem component = gameObject.GetComponent<PurchaseRewardItem>();
if (shopCommonRewardInfo.Type == 5)
{
GameObject cardObj = GetCardObj(shopCommonRewardInfo.UserGoodsId);
component.SetUserGoods(purchaseRewardInfo, useLargeDetailDialog, cardObj, isPaging, isEnableItemNumber: true);
}
else
{
component.SetUserGoods(purchaseRewardInfo, useLargeDetailDialog, null, isPaging, _layout != Layout.TITLE_BOTTOM_LARGE_FONT);
}
component.DetailDialogTitleOverride = _detailDialogTitleOverride;
_rewardObjectsList.Add(gameObject);
}
if (count <= 4)
{
float scale = ((count <= 3) ? 1.5f : 1.25f);
foreach (GameObject rewardObjects in _rewardObjectsList)
{
rewardObjects.GetComponent<PurchaseRewardItem>().SetScale(scale);
}
if (count <= 3)
{
float num = ((count == 3) ? 1.25f : 1.5f);
_itemGrid.cellWidth *= num;
_itemGrid.cellHeight *= num;
}
}
if (_layout == Layout.TITLE_BOTTOM_LARGE_FONT)
{
_itemGrid.cellWidth = 275f;
}
}
private void InitializePage(List<PurchaseRewardInfo> rewardsList)
{
_lastPageIndex = (rewardsList.Count - 1) / _rewardNumParPage + 1;
_currentPageIndex = _lastPageIndex;
for (int i = 0; i < rewardsList.Count; i++)
{
if (!rewardsList[i].IsGet)
{
_currentPageIndex = i / _rewardNumParPage + 1;
break;
}
}
_indicator.Init(_lastPageIndex);
if (_lastPageIndex > 1)
{
_flickCollider.gameObject.SetActive(value: true);
UIEventListener uIEventListener = UIEventListener.Get(_flickCollider.gameObject);
uIEventListener.onDragStart = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onDragStart, new UIEventListener.VoidDelegate(OnDragStart));
UIEventListener uIEventListener2 = UIEventListener.Get(_flickCollider.gameObject);
uIEventListener2.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener2.onDrag, new UIEventListener.VectorDelegate(OnDrag));
UIEventListener uIEventListener3 = UIEventListener.Get(_btnPrevPage.gameObject);
uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, (UIEventListener.VoidDelegate)delegate
{
ShowPrevPage();
});
UIEventListener uIEventListener4 = UIEventListener.Get(_btnNextPage.gameObject);
uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, (UIEventListener.VoidDelegate)delegate
{
ShowNextPage();
});
}
if (rewardsList.Count <= 4)
{
_itemGrid.transform.localPosition = Vector3.zero;
_itemGrid.pivot = UIWidget.Pivot.Center;
_centerLine.SetActive(value: false);
}
}
private void ShowPage(int pageIndex)
{
_currentPageIndex = pageIndex;
for (int i = 0; i < _rewardObjectsList.Count; i++)
{
_rewardObjectsList[i].gameObject.SetActive(value: false);
}
int num = (_currentPageIndex - 1) * _rewardNumParPage;
int num2 = Mathf.Min(num + _rewardNumParPage, _rewardObjectsList.Count);
for (int j = num; j < num2; j++)
{
_rewardObjectsList[j].gameObject.SetActive(value: true);
}
_itemGrid.Reposition();
_btnPrevPage.gameObject.SetActive(!IsFirstPage);
_btnNextPage.gameObject.SetActive(!IsLastPage);
_indicator.UpdateIndicator(_currentPageIndex);
}
private void ShowPrevPage()
{
if (!IsFirstPage)
{
ShowPage(_currentPageIndex - 1);
}
}
private void ShowNextPage()
{
if (!IsLastPage)
{
ShowPage(_currentPageIndex + 1);
}
}
private void OnDragStart(GameObject obj)
{
_flickStart = true;
}
private void OnDrag(GameObject obj, Vector2 dir)
{
if (_flickStart)
{
if (dir.x >= 70f)
{
_flickStart = false;
ShowPrevPage();
}
else if (dir.x <= -70f)
{
_flickStart = false;
ShowNextPage();
}
}
}
private IEnumerator LoadResources(List<PurchaseRewardInfo> purchaseRewardsList, Action onFinish)
{
List<string> rewardPathList = new List<string>();
for (int i = 0; i < purchaseRewardsList.Count; i++)
{
for (int j = 0; j < purchaseRewardsList[i].RewardInfoList.Count; j++)
{
ShopCommonRewardInfo shopCommonRewardInfo = purchaseRewardsList[i].RewardInfoList[j];
string text = string.Empty;
switch ((UserGoods.Type)shopCommonRewardInfo.Type)
{
case UserGoods.Type.Item:
{
string userGoodsImageName = UserGoods.GetUserGoodsImageName(UserGoods.Type.Item, shopCommonRewardInfo.UserGoodsId);
text = Toolbox.ResourcesManager.GetAssetTypePath(userGoodsImageName, ResourcesManager.AssetLoadPathType.Item);
break;
}
case UserGoods.Type.Degree:
text = Toolbox.ResourcesManager.GetAssetTypePath(UserGoods.GetUserGoodsImageName(UserGoods.Type.Degree, 0L), ResourcesManager.AssetLoadPathType.Item);
break;
case UserGoods.Type.Sleeve:
{
long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(shopCommonRewardInfo.UserGoodsId);
text = Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture);
Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId);
if (sleeve.IsPremiumSleeve)
{
UIManager.GetInstance().getUIBase_CardManager().AddPremireSleevePath(ref rewardPathList, sleeve);
}
break;
}
case UserGoods.Type.Emblem:
text = Toolbox.ResourcesManager.GetAssetTypePath(shopCommonRewardInfo.UserGoodsId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M);
break;
}
if (text != string.Empty && !rewardPathList.Contains(text) && !_loadedResourceList.Contains(text))
{
rewardPathList.Add(text);
}
}
}
yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(rewardPathList, null));
_loadedResourceList.AddRange(rewardPathList);
yield return StartCoroutine(LoadCardObject(purchaseRewardsList));
onFinish.Call();
}
private IEnumerator LoadCardObject(List<PurchaseRewardInfo> purchaseRewardsList)
{
List<int> cardIdList = GetCardIdList(purchaseRewardsList);
if (cardIdList.Count != 0)
{
UIBase_CardManager uiCardMgr = UIManager.GetInstance().getUIBase_CardManager();
int layer = LayerMask.NameToLayer("MyPage");
UIManager.GetInstance().CardLoadSelect(base.gameObject, cardIdList, layer, is2D: true);
while (!uiCardMgr.getCreateEndFlag() || !uiCardMgr.isAssetAllReady)
{
yield return null;
}
SetCardObj();
}
}
private List<int> GetCardIdList(List<PurchaseRewardInfo> purchaseRewardsList)
{
List<int> list = new List<int>();
for (int i = 0; i < purchaseRewardsList.Count; i++)
{
PurchaseRewardInfo purchaseRewardInfo = purchaseRewardsList[i];
for (int j = 0; j < purchaseRewardInfo.RewardInfoList.Count; j++)
{
ShopCommonRewardInfo shopCommonRewardInfo = purchaseRewardInfo.RewardInfoList[j];
if (shopCommonRewardInfo.Type == 5 && !list.Contains((int)shopCommonRewardInfo.UserGoodsId))
{
list.Add((int)shopCommonRewardInfo.UserGoodsId);
}
}
}
return list;
}
private void SetCardObj()
{
_cardObjList = UIManager.GetInstance().getCardList2DObjs();
if (_cardObjList == null)
{
return;
}
for (int i = 0; i < _cardObjList.Count; i++)
{
GameObject cardObj = _cardObjList[i].CardObj;
if (!(null == cardObj))
{
cardObj.SetActive(value: false);
CardListTemplate component = cardObj.GetComponent<CardListTemplate>();
component.HideNum();
component._newLabel.gameObject.SetActive(value: false);
UITexture[] componentsInChildren = cardObj.GetComponentsInChildren<UITexture>(includeInactive: true);
for (int j = 0; j < componentsInChildren.Length; j++)
{
componentsInChildren[j].depth += 23;
}
UILabel[] componentsInChildren2 = cardObj.GetComponentsInChildren<UILabel>(includeInactive: true);
for (int k = 0; k < componentsInChildren2.Length; k++)
{
componentsInChildren2[k].depth += 23;
}
component._frameSprite.depth = 23;
component._cardTexture.depth = 21;
cardObj.AddComponent<BoxCollider>().size = CARDOBJECT_COLLIDER_SIZE;
UIEventListener.Get(cardObj).onClick = _cardDetail.OnPushCardDetailOn;
if (_lastPageIndex > 1)
{
UIEventListener uIEventListener = UIEventListener.Get(cardObj);
uIEventListener.onDragStart = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onDragStart, new UIEventListener.VoidDelegate(OnDragStart));
UIEventListener uIEventListener2 = UIEventListener.Get(cardObj);
uIEventListener2.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener2.onDrag, new UIEventListener.VectorDelegate(OnDrag));
}
}
}
}
private GameObject GetCardObj(long userGoodsId)
{
GameObject result = null;
for (int i = 0; i < _cardObjList.Count; i++)
{
if (_cardObjList[i] != null && userGoodsId == _cardObjList[i].ids)
{
result = _cardObjList[i].CardObj;
break;
}
}
return result;
}
}

View File

@@ -1,318 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using Cute;
using UnityEngine;
namespace Wizard;
public class PurchaseRewardItem : MonoBehaviour
{
private readonly Quaternion CARDOBJECT_ROTATION_QUATERNION = new Quaternion(0f, 0f, 0f, 0f);
[SerializeField]
private Vector3 _sleeveAndEmblemColliderSize = new Vector3(200f, 200f, 0f);
[SerializeField]
private Vector3 _sleeveAndEmblemColliderCenter = new Vector3(0f, 0f, 0f);
[SerializeField]
private UILabel _labelPurchaseNth;
[SerializeField]
private GameObject _objCardLayout;
[SerializeField]
private GameObject _objCardRoot;
[SerializeField]
private GameObject _objSleeveLayout;
[SerializeField]
private UITexture _textureSleeve;
[SerializeField]
private GameObject _degreeLayout;
[SerializeField]
private UITexture _degreeTexture;
[SerializeField]
private GameObject _objEmblemLayout;
[SerializeField]
private UITexture _textureEmblem;
[SerializeField]
private GameObject _objTwoEmblemsLayout;
[SerializeField]
private UITexture[] _textureTwoEmblems;
[SerializeField]
private GameObject _objComboSleeveEmblemLayout;
[SerializeField]
private UITexture _textureComboSleeve;
[SerializeField]
private UITexture _textureComboEmblem;
[SerializeField]
private GameObject _objComboMultiEmblemsParent;
[SerializeField]
private UITexture[] _textureComboMultiEmblems;
[SerializeField]
private GameObject _objItemLayout;
[SerializeField]
private UITexture _textureItem;
[SerializeField]
private UILabel _labelAcquired;
[SerializeField]
private UISprite _spriteAcquiredCardMask;
[SerializeField]
private GameObject _objItemNum;
[SerializeField]
private UILabel _labelItemNum;
[SerializeField]
private GameObject[] _objLayouts;
public string DetailDialogTitleOverride { get; set; }
// InstantiateDetailPrefab removed: CardSleeveDetailWindow deleted (DEAD-COLD engine cleanup Task 13)
public void SetUserGoods(PurchaseRewardInfo purchaseReward, bool useLargeDetailDialog, GameObject cardObj, bool isPaging, bool isEnableItemNumber)
{
SetPurchaseNthLabel(purchaseReward.PurchaseNthText);
GameObject[] objLayouts = _objLayouts;
for (int i = 0; i < objLayouts.Length; i++)
{
objLayouts[i].SetActive(value: false);
}
List<ShopCommonRewardInfo> rewardInfoList = purchaseReward.RewardInfoList;
if (rewardInfoList.Count == 1)
{
ShopCommonRewardInfo shopCommonRewardInfo = rewardInfoList[0];
switch ((UserGoods.Type)shopCommonRewardInfo.Type)
{
case UserGoods.Type.Card:
SetCardLayout(shopCommonRewardInfo, cardObj);
ItemNumVisible(visible: true);
SetItemNum(shopCommonRewardInfo);
SetAcquired(_objCardLayout, purchaseReward.IsGet);
if (purchaseReward.IsGet)
{
_spriteAcquiredCardMask.gameObject.SetActive(value: true);
cardObj.GetComponent<BoxCollider>().enabled = true;
}
_objCardLayout.gameObject.SetActive(value: true);
break;
case UserGoods.Type.Sleeve:
SetTexture(shopCommonRewardInfo, _textureSleeve);
ItemNumVisible(visible: false);
SetAcquired(_objSleeveLayout, purchaseReward.IsGet);
_objSleeveLayout.gameObject.SetActive(value: true);
SetRewardDetailDialog(_objSleeveLayout, rewardInfoList, useLargeDetailDialog, isPaging);
break;
case UserGoods.Type.Emblem:
SetTexture(shopCommonRewardInfo, _textureEmblem);
ItemNumVisible(visible: false);
SetAcquired(_objEmblemLayout, purchaseReward.IsGet);
_objEmblemLayout.gameObject.SetActive(value: true);
SetRewardDetailDialog(_objEmblemLayout, rewardInfoList, useLargeDetailDialog, isPaging);
break;
case UserGoods.Type.Item:
SetTexture(shopCommonRewardInfo, _textureItem);
ItemNumVisible(isEnableItemNumber);
SetItemNum(shopCommonRewardInfo);
SetAcquired(_objItemLayout, purchaseReward.IsGet);
_objItemLayout.gameObject.SetActive(value: true);
break;
case UserGoods.Type.Degree:
SetTexture(shopCommonRewardInfo, _degreeTexture);
ItemNumVisible(visible: false);
SetAcquired(_degreeLayout, purchaseReward.IsGet);
_degreeLayout.gameObject.SetActive(value: true);
break;
}
}
else if (rewardInfoList.Count == 2)
{
List<ShopCommonRewardInfo> list = rewardInfoList.Where((ShopCommonRewardInfo reward) => reward.Type == 6).ToList();
List<ShopCommonRewardInfo> list2 = rewardInfoList.Where((ShopCommonRewardInfo reward) => reward.Type == 7).ToList();
int count = list.Count;
int count2 = list2.Count;
if (count2 == 1 && count == 1)
{
SetTexture(list[0], _textureComboSleeve);
SetTexture(list2[0], _textureComboEmblem);
ItemNumVisible(visible: false);
SetAcquired(_objComboSleeveEmblemLayout, purchaseReward.IsGet);
_objComboSleeveEmblemLayout.SetActive(value: true);
SetRewardDetailDialog(_objComboSleeveEmblemLayout, rewardInfoList, useLargeDetailDialog, isPaging);
}
else if (count2 == 2 && count == 0)
{
SetTexture(list2[0], _textureTwoEmblems[0]);
SetTexture(list2[1], _textureTwoEmblems[1]);
ItemNumVisible(visible: false);
SetAcquired(_objTwoEmblemsLayout, purchaseReward.IsGet);
_objTwoEmblemsLayout.SetActive(value: true);
SetRewardDetailDialog(_objTwoEmblemsLayout, rewardInfoList, useLargeDetailDialog, isPaging);
}
}
else
{
if (rewardInfoList.Count <= 2)
{
return;
}
List<ShopCommonRewardInfo> list3 = rewardInfoList.Where((ShopCommonRewardInfo reward) => reward.Type == 6).ToList();
List<ShopCommonRewardInfo> list4 = rewardInfoList.Where((ShopCommonRewardInfo reward) => reward.Type == 7).ToList();
int count3 = list3.Count;
int count4 = list4.Count;
int num = rewardInfoList.Count - count3 - count4;
if (count3 != 1 || count4 < 2 || count4 > 4 || num != 0)
{
return;
}
SetTexture(list3[0], _textureComboSleeve);
for (int num2 = 0; num2 < _textureComboMultiEmblems.Length; num2++)
{
if (num2 > count4 - 1)
{
_textureComboMultiEmblems[num2].gameObject.SetActive(value: false);
continue;
}
SetTexture(list4[num2], _textureComboMultiEmblems[num2]);
_textureComboMultiEmblems[num2].gameObject.SetActive(value: true);
}
ItemNumVisible(visible: false);
SetAcquired(_objComboSleeveEmblemLayout, purchaseReward.IsGet);
_objComboSleeveEmblemLayout.gameObject.SetActive(value: true);
_objComboMultiEmblemsParent.SetActive(value: true);
_textureComboEmblem.gameObject.SetActive(value: false);
SetRewardDetailDialog(_objComboSleeveEmblemLayout, rewardInfoList, useLargeDetailDialog, isPaging);
}
}
private void SetPurchaseNthLabel(string purchaseNthText)
{
_labelPurchaseNth.SetWrapText(purchaseNthText);
}
private void SetCardLayout(ShopCommonRewardInfo rewardCardInfo, GameObject cardObj)
{
cardObj.transform.parent = _objCardRoot.transform;
cardObj.transform.localPosition = Vector3.zero;
cardObj.transform.localScale = Vector3.one;
cardObj.transform.rotation = CARDOBJECT_ROTATION_QUATERNION;
cardObj.SetActive(value: true);
}
private void SetTexture(ShopCommonRewardInfo rewardInfo, UITexture uiTexture)
{
string empty = string.Empty;
long id = 3000011L;
switch ((UserGoods.Type)rewardInfo.Type)
{
default:
return;
case UserGoods.Type.Sleeve:
id = Toolbox.ResourcesManager.GetExistingSleeveId(rewardInfo.UserGoodsId);
empty = Toolbox.ResourcesManager.GetAssetTypePath(id.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture, isfetch: true);
break;
case UserGoods.Type.Emblem:
empty = Toolbox.ResourcesManager.GetAssetTypePath(rewardInfo.UserGoodsId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true);
break;
case UserGoods.Type.Item:
{
Item item = Data.Master.ItemList.Find((Item data) => data.UserGoodsId == rewardInfo.UserGoodsId);
if (item == null)
{
return;
}
empty = Toolbox.ResourcesManager.GetAssetTypePath(item.thumbnail, ResourcesManager.AssetLoadPathType.Item, isfetch: true);
break;
}
case UserGoods.Type.Degree:
empty = Toolbox.ResourcesManager.GetAssetTypePath(UserGoods.GetUserGoodsImageName(UserGoods.Type.Degree, 0L), ResourcesManager.AssetLoadPathType.Item, isfetch: true);
break;
case UserGoods.Type.Card:
return;
}
Texture mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(empty);
uiTexture.mainTexture = mainTexture;
uiTexture.material = null;
if (rewardInfo.Type == 6)
{
Sleeve sleeve = Data.Master.SleeveMgr.Get(id);
if (sleeve.IsPremiumSleeve)
{
UIManager.GetInstance().getUIBase_CardManager().SetSleeveTexture(uiTexture, sleeve.sleeve_id);
}
}
}
private void ItemNumVisible(bool visible)
{
_objItemNum.gameObject.SetActive(visible);
}
private void SetItemNum(ShopCommonRewardInfo rewardInfo)
{
_labelItemNum.text = rewardInfo.Num.ToString();
}
private void SetAcquired(GameObject layout, bool isAcquired)
{
_labelAcquired.gameObject.SetActive(isAcquired);
UIManager.SetObjectToGrey(layout, isAcquired);
UIManager.SetObjectToGrey(_objItemNum, isAcquired);
}
private void SetRewardDetailDialog(GameObject root, List<ShopCommonRewardInfo> rewardList, bool useLargeDetailDialog, bool isPaging)
{
BoxCollider boxCollider = root.AddComponent<BoxCollider>();
boxCollider.size = _sleeveAndEmblemColliderSize;
boxCollider.center = _sleeveAndEmblemColliderCenter;
UIEventListener.Get(root).onClick = delegate
{
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetSize(DialogBase.Size.M);
dialogBase.SetTitleLabel(string.IsNullOrEmpty(DetailDialogTitleOverride) ? Data.SystemText.Get("Shop_0185") : DetailDialogTitleOverride);
if (isPaging)
{
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
dialogBase.SetLayer("Loading");
RewardBase component = NGUITools.AddChild(dialogBase.gameObject, UIManager.GetInstance().GetRewardDialogPrefab().gameObject).GetComponent<RewardBase>();
for (int i = 0; i < rewardList.Count; i++)
{
component.AddReward(rewardList[i]);
}
component.SetActiveRewardLabel(isShow: false);
component.EndCreate();
}
else
{
// CardSleeveDetailWindow removed (DEAD-COLD engine cleanup Task 13)
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn);
}
};
}
public void SetScale(float scale)
{
base.transform.localScale = new Vector3(scale, scale, 1f);
Vector3 localScale = new Vector3(1f / scale, 1f / scale, 1f);
_labelPurchaseNth.transform.localScale = localScale;
_labelItemNum.transform.parent.localScale = localScale;
}
}

View File

@@ -43,22 +43,4 @@ public class RemainTime
LocalTime = ConvertTime.ToLocal(dateTime).ToString(); LocalTime = ConvertTime.ToLocal(dateTime).ToString();
TimeInLocal = ConvertTime.ToLocalByDateTime(dateTime); TimeInLocal = ConvertTime.ToLocalByDateTime(dateTime);
} }
public string GetShowText(string minuteId, string hourId, string dayId)
{
SystemText systemText = Data.SystemText;
string text = null;
if (Second < 3600)
{
int num = Second / 60 + 1;
return systemText.Get(minuteId, num.ToString());
}
if (Second < 86400)
{
int num2 = Second / 3600;
return systemText.Get(hourId, num2.ToString());
}
int num3 = Second / 86400;
return systemText.Get(dayId, num3.ToString());
}
} }

View File

@@ -111,15 +111,6 @@ public class RewardBase : MonoBehaviour
} }
} }
public void SetCardDetailUI(CardDetailUI detail)
{
if (detail != null)
{
CardDetail = detail;
CardDetailRoot.SetActive(value: false);
}
}
public void Awake() public void Awake()
{ {
SystemText systemText = Data.SystemText; SystemText systemText = Data.SystemText;
@@ -184,16 +175,6 @@ public class RewardBase : MonoBehaviour
AddReward((UserGoods.Type)r.reward_type, r.rewardUserGoodsId, r.reward_count); AddReward((UserGoods.Type)r.reward_type, r.rewardUserGoodsId, r.reward_count);
} }
public NguiObjs AddReward(Wizard.Scripts.Network.Data.TaskData.Arena.Reward r)
{
return AddReward(r.UserGoodsData.GoodsType, r.UserGoodsData.Id, r.num);
}
public void AddReward(ShopCommonRewardInfo shopCommonRewardInfo)
{
AddReward((UserGoods.Type)shopCommonRewardInfo.Type, shopCommonRewardInfo.UserGoodsId, shopCommonRewardInfo.Num);
}
private void _LoadAndSetRewardTex(string strFileName, ResourcesManager.AssetLoadPathType pathType, UITexture tex, List<string> loadedPathList) private void _LoadAndSetRewardTex(string strFileName, ResourcesManager.AssetLoadPathType pathType, UITexture tex, List<string> loadedPathList)
{ {
string strPath = Toolbox.ResourcesManager.GetAssetTypePath(strFileName, pathType); string strPath = Toolbox.ResourcesManager.GetAssetTypePath(strFileName, pathType);
@@ -230,12 +211,6 @@ public class RewardBase : MonoBehaviour
return component; return component;
} }
public void ChangeRewardTextureSize(NguiObjs rewardObj, int width, int height)
{
rewardObj.textures[0].width = width;
rewardObj.textures[0].height = height;
}
public NguiObjs AddReward(UserGoods.Type type, long userGoodsId, int number) public NguiObjs AddReward(UserGoods.Type type, long userGoodsId, int number)
{ {
NguiObjs nguiObjs = null; NguiObjs nguiObjs = null;
@@ -446,11 +421,6 @@ public class RewardBase : MonoBehaviour
} }
} }
public void SetActiveRewardLabel(bool isShow)
{
RewardLabel.gameObject.SetActive(isShow);
}
public void SetTitleLabel(bool isEnabled, string title = null) public void SetTitleLabel(bool isEnabled, string title = null)
{ {
_labelTitle.gameObject.SetActive(isEnabled); _labelTitle.gameObject.SetActive(isEnabled);

View File

@@ -1,98 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class RewardConfirmDialog : MonoBehaviour
{
[SerializeField]
private UILabel _rewardConfirmLabelMainFirst;
[SerializeField]
private UILabel _rewardConfirmLabelMainSecond;
[SerializeField]
private UILabel _rewardConfirmLabelSub;
[SerializeField]
private GameObject _rewardDialogRoot;
[SerializeField]
private RewardBase _rewardDialog;
[SerializeField]
private RewardBase _pageChangeRewardPrefab;
[SerializeField]
private RewardConfirmView _reardConfirmViewFor4;
public void CreateRewardConfirmDialog(GachaPointExchangeInfo gachaPointExchangeInfo, int dialogInnerDepth, int dialogInnerSortingOrder)
{
if (gachaPointExchangeInfo.RewardList.Count >= 5 && !RewardConfirmView.IsSpecialEmblemLayout(gachaPointExchangeInfo.RewardList))
{
CreateRewardViewForPageChange(gachaPointExchangeInfo.RewardList, dialogInnerDepth, dialogInnerSortingOrder);
}
else if (gachaPointExchangeInfo.RewardList.Count <= 3)
{
CreateRewardViewFor3(gachaPointExchangeInfo.RewardList, dialogInnerDepth, dialogInnerSortingOrder);
}
else
{
CreateRewardViewFor4(gachaPointExchangeInfo.RewardList);
}
}
public void SetText(string mainTextFirst, string mainTextSecond, string subText)
{
_rewardConfirmLabelMainFirst.text = mainTextFirst;
_rewardConfirmLabelMainSecond.text = mainTextSecond;
_rewardConfirmLabelSub.text = subText;
}
private void CreateRewardViewFor3(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList, int dialogInnerDepth, int dialogInnerSortingOrder)
{
_reardConfirmViewFor4.gameObject.SetActive(value: false);
RewardBase component = NGUITools.AddChild(_rewardDialogRoot, _rewardDialog.gameObject).GetComponent<RewardBase>();
UIPanel component2 = component.gameObject.GetComponent<UIPanel>();
component2.depth = dialogInnerDepth;
component2.sortingOrder = dialogInnerSortingOrder;
component.SetActiveRewardLabel(isShow: false);
for (int i = 0; i < rewardList.Count; i++)
{
component.AddReward(rewardList[i]);
}
component.EndCreate();
}
private void CreateRewardViewForPageChange(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList, int dialogInnerDepth, int dialogInnerSortingOrder)
{
_reardConfirmViewFor4.gameObject.SetActive(value: false);
RewardBase component = NGUITools.AddChild(_rewardDialogRoot, _pageChangeRewardPrefab.gameObject).GetComponent<RewardBase>();
UIPanel component2 = component.gameObject.GetComponent<UIPanel>();
component2.depth = dialogInnerDepth;
component2.sortingOrder = dialogInnerSortingOrder;
component.SetActiveRewardLabel(isShow: false);
for (int i = 0; i < rewardList.Count; i++)
{
NguiObjs rewardObj = component.AddReward(rewardList[i]);
switch (rewardList[i].UserGoodsData.GoodsType)
{
case UserGoods.Type.Sleeve:
component.ChangeRewardTextureSize(rewardObj, 145, 200);
break;
case UserGoods.Type.Degree:
case UserGoods.Type.MyPageBG:
component.ChangeRewardTextureSize(rewardObj, 145, 145);
break;
}
}
component.EndCreate();
}
private void CreateRewardViewFor4(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList)
{
_reardConfirmViewFor4.gameObject.SetActive(value: true);
_reardConfirmViewFor4.Initialize(rewardList);
}
}

View File

@@ -1,107 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Cute;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class RewardConfirmView : MonoBehaviour
{
[SerializeField]
private UIGrid _gridRewardViewFor4;
[SerializeField]
private RewardConfirmViewItem _itemOriginal;
private List<string> _loadedResourceList;
public static bool IsSpecialEmblemLayout(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList)
{
if (rewardList.Count() == 5)
{
return rewardList.Count((Wizard.Scripts.Network.Data.TaskData.Arena.Reward n) => n.UserGoodsData.GoodsType == UserGoods.Type.Emblem) == 2;
}
return false;
}
public void Initialize(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList)
{
_gridRewardViewFor4.gameObject.SetActive(value: true);
UIManager.GetInstance().createInSceneCenterLoading();
LoadResources(rewardList, delegate
{
UIManager.GetInstance().closeInSceneCenterLoading();
if (IsSpecialEmblemLayout(rewardList))
{
List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> list = new List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward>();
foreach (Wizard.Scripts.Network.Data.TaskData.Arena.Reward reward in rewardList)
{
if (reward.UserGoodsData.GoodsType == UserGoods.Type.Emblem)
{
list.Add(reward);
if (list.Count() == 2)
{
NGUITools.AddChild(_gridRewardViewFor4.gameObject, _itemOriginal.gameObject).GetComponent<RewardConfirmViewItem>().InitializeForTwoEmblem(list[0], list[1]);
}
}
else
{
NGUITools.AddChild(_gridRewardViewFor4.gameObject, _itemOriginal.gameObject).GetComponent<RewardConfirmViewItem>().Initialize(reward.UserGoodsData, reward.num);
}
}
}
else
{
foreach (Wizard.Scripts.Network.Data.TaskData.Arena.Reward reward2 in rewardList)
{
NGUITools.AddChild(_gridRewardViewFor4.gameObject, _itemOriginal.gameObject).GetComponent<RewardConfirmViewItem>().Initialize(reward2.UserGoodsData, reward2.num);
}
}
_itemOriginal.gameObject.SetActive(value: false);
_gridRewardViewFor4.repositionNow = true;
});
}
private void LoadResources(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> rewardList, Action onFinish)
{
List<string> rewardPathList = new List<string>();
foreach (Wizard.Scripts.Network.Data.TaskData.Arena.Reward reward in rewardList)
{
UserGoods userGoodsData = reward.UserGoodsData;
switch (userGoodsData.GoodsType)
{
case UserGoods.Type.Sleeve:
{
long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(userGoodsData.Id);
rewardPathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture));
Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId);
if (sleeve.IsPremiumSleeve)
{
UIManager.GetInstance().getUIBase_CardManager().AddPremireSleevePath(ref rewardPathList, sleeve);
}
break;
}
case UserGoods.Type.Emblem:
rewardPathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(userGoodsData.Id.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M));
break;
case UserGoods.Type.Skin:
rewardPathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(userGoodsData.Id.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail));
break;
case UserGoods.Type.Degree:
rewardPathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(userGoodsData.Thumbnail, ResourcesManager.AssetLoadPathType.Item));
break;
case UserGoods.Type.MyPageBG:
rewardPathList.Add(Toolbox.ResourcesManager.GetAssetTypePath("thumbnail_mypage_custom_bg", ResourcesManager.AssetLoadPathType.Item));
break;
}
}
rewardPathList.Distinct();
UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(rewardPathList, delegate
{
_loadedResourceList = rewardPathList;
onFinish.Call();
}));
}
}

View File

@@ -1,121 +0,0 @@
using Cute;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class RewardConfirmViewItem : MonoBehaviour
{
[SerializeField]
private UITexture _textureSleeve;
[SerializeField]
private UITexture _textureEmblem;
[SerializeField]
private UITexture _textureSkin;
[SerializeField]
private UITexture _textureDegree;
[SerializeField]
private UITexture _textureMyPageBG;
[SerializeField]
private UILabel _labelRewardItemName;
[SerializeField]
private UITexture _textureEmblem1;
[SerializeField]
private UITexture _textureEmblem2;
[SerializeField]
private UILabel _labelEmblemRewardItemName1;
[SerializeField]
private UILabel _labelEmblemRewardItemName2;
public void Initialize(UserGoods userGoods, int number)
{
SetTexture(userGoods);
string presentItemName = AreaSelInfo.GetPresentItemName((int)userGoods.GoodsType, userGoods.Id);
_labelRewardItemName.SetWrapText(presentItemName + Data.SystemText.Get("Common_0040", number.ToString()));
}
public void InitializeForTwoEmblem(Wizard.Scripts.Network.Data.TaskData.Arena.Reward emblemReward1, Wizard.Scripts.Network.Data.TaskData.Arena.Reward emblemReward2)
{
_textureSleeve.gameObject.SetActive(value: false);
_textureEmblem.gameObject.SetActive(value: false);
_textureSkin.gameObject.SetActive(value: false);
_textureDegree.gameObject.SetActive(value: false);
_labelRewardItemName.gameObject.SetActive(value: false);
_textureEmblem1.gameObject.SetActive(value: true);
string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(emblemReward1.UserGoodsData.Id.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true);
_textureEmblem1.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath);
_textureEmblem2.gameObject.SetActive(value: true);
string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(emblemReward2.UserGoodsData.Id.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true);
_textureEmblem2.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath2);
_labelEmblemRewardItemName1.gameObject.SetActive(value: true);
string presentItemName = AreaSelInfo.GetPresentItemName((int)emblemReward1.UserGoodsData.GoodsType, emblemReward1.UserGoodsData.Id);
_labelEmblemRewardItemName1.SetWrapText(presentItemName + Data.SystemText.Get("Common_0040", emblemReward1.num.ToString()));
_labelEmblemRewardItemName2.gameObject.SetActive(value: true);
string presentItemName2 = AreaSelInfo.GetPresentItemName((int)emblemReward2.UserGoodsData.GoodsType, emblemReward2.UserGoodsData.Id);
_labelEmblemRewardItemName2.SetWrapText(presentItemName2 + Data.SystemText.Get("Common_0040", emblemReward2.num.ToString()));
}
private void SetTexture(UserGoods userGoods)
{
_textureSleeve.gameObject.SetActive(value: false);
_textureEmblem.gameObject.SetActive(value: false);
_textureSkin.gameObject.SetActive(value: false);
_textureDegree.gameObject.SetActive(value: false);
_textureEmblem1.gameObject.SetActive(value: false);
_textureEmblem2.gameObject.SetActive(value: false);
_labelEmblemRewardItemName1.gameObject.SetActive(value: false);
_labelEmblemRewardItemName2.gameObject.SetActive(value: false);
_textureMyPageBG.gameObject.SetActive(value: false);
switch (userGoods.GoodsType)
{
case UserGoods.Type.Sleeve:
{
_textureSleeve.gameObject.SetActive(value: true);
long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(userGoods.Id);
Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId);
if (sleeve.IsPremiumSleeve)
{
UIManager.GetInstance().getUIBase_CardManager().SetSleeveTexture(_textureSleeve, sleeve.sleeve_id);
break;
}
string assetTypePath4 = Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture, isfetch: true);
_textureSleeve.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath4);
break;
}
case UserGoods.Type.Emblem:
{
_textureEmblem.gameObject.SetActive(value: true);
string assetTypePath3 = Toolbox.ResourcesManager.GetAssetTypePath(userGoods.Id.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true);
_textureEmblem.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath3);
break;
}
case UserGoods.Type.Skin:
{
_textureSkin.gameObject.SetActive(value: true);
string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(userGoods.Id.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail, isfetch: true);
_textureSkin.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath2);
break;
}
case UserGoods.Type.Degree:
{
_textureDegree.gameObject.SetActive(value: true);
string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(userGoods.Thumbnail, ResourcesManager.AssetLoadPathType.Item, isfetch: true);
_textureDegree.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(assetTypePath);
break;
}
case UserGoods.Type.MyPageBG:
_textureMyPageBG.gameObject.SetActive(value: true);
_textureMyPageBG.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(Toolbox.ResourcesManager.GetAssetTypePath("thumbnail_mypage_custom_bg", ResourcesManager.AssetLoadPathType.Item, isfetch: true));
break;
}
}
}

View File

@@ -1,206 +0,0 @@
using System;
using UnityEngine;
namespace Wizard;
public class SelectBuyNumPopupBase : UIBase
{
[SerializeField]
protected UITexture _PackLogo;
[SerializeField]
protected UILabel _buyPackLabel;
[SerializeField]
protected UITexture _iconTicket;
[SerializeField]
protected UISprite _iconCrystal;
[SerializeField]
protected UISprite _iconRupy;
[SerializeField]
protected UIButton _buttonPlus;
[SerializeField]
protected UIButton _buttonMinus;
[SerializeField]
protected UIButton _buttonMax;
[SerializeField]
protected UIButton _buttonPurchase;
[SerializeField]
protected UILabel _labelHaveItemName;
[SerializeField]
protected UILabel _labelHaveNumItems;
[SerializeField]
protected UILabel _labelCostPerPack;
[SerializeField]
protected UILabel _labelBuyNum;
[SerializeField]
protected UILabel _labelBuyNumPurchaseBtn;
[SerializeField]
protected UILabel _labelCostNamePurchaseBtn;
[SerializeField]
protected UILabel _labelCostNumPurchaseBtn;
[SerializeField]
protected UILabel _labelBtnMax;
[SerializeField]
private bool _isOverrideDisableMaxLabelColor;
[SerializeField]
private Color32 _maxLabelOverrideColor;
protected DialogBase _dialog;
protected int _gachaCostPerPack;
protected int _buyNum = 1;
protected int _ableBuyNum;
protected bool _isChangedNum;
protected bool _isPressingPlusBtn;
protected bool _isPressingMinusBtn;
protected float _timePressingPlusBtn;
protected float _timePressingMinusBtn;
protected virtual string _labelBuyNumPurchaseBtnTextId => "Shop_0046";
protected void OnPressToPlusBtn(GameObject go, bool state)
{
_isPressingPlusBtn = state;
if (!state)
{
if (!_isChangedNum && !_isPressingMinusBtn)
{
PlusBuyNum();
}
}
else
{
}
_timePressingPlusBtn = 0f;
_isChangedNum = false;
}
protected void OnPressToMinusBtn(GameObject go, bool state)
{
_isPressingMinusBtn = state;
if (!state)
{
if (!_isChangedNum && !_isPressingPlusBtn)
{
MinusBuyNum();
}
}
else
{
}
_timePressingMinusBtn = 0f;
_isChangedNum = false;
}
protected void PlusBuyNum()
{
if (_buyNum < _ableBuyNum)
{
_buyNum++;
UpdateBuyNumDisplays();
}
}
protected void MinusBuyNum()
{
if (_buyNum > 1)
{
_buyNum--;
UpdateBuyNumDisplays();
}
}
protected void SetEnablePlusBtn(bool _isEnable)
{
_buttonPlus.isEnabled = _isEnable;
if (!_isEnable)
{
_isPressingPlusBtn = false;
_timePressingPlusBtn = 0f;
_isChangedNum = false;
}
}
protected void SetEnableMinusBtn(bool _isEnable)
{
_buttonMinus.isEnabled = _isEnable;
if (!_isEnable)
{
_isPressingMinusBtn = false;
_timePressingMinusBtn = 0f;
_isChangedNum = false;
}
}
protected void OnBtnPurchase(Action<PackConfig, PackChildGachaInfo, int> OnClickPurchase, PackConfig packConfig, PackChildGachaInfo gachaInfo)
{
OnClickPurchase(packConfig, gachaInfo, _buyNum);
_dialog.CloseWithoutSelect();
}
protected void OnBtnMax()
{
_buyNum = _ableBuyNum;
UpdateBuyNumDisplays();
}
protected void UpdateBuyNumDisplays()
{
int num = _buyNum * _gachaCostPerPack;
_labelBuyNum.text = _buyNum.ToString();
_labelBuyNumPurchaseBtn.text = Data.SystemText.Get(_labelBuyNumPurchaseBtnTextId, _buyNum.ToString());
_labelCostNumPurchaseBtn.text = num.ToString();
if (_buyNum >= _ableBuyNum)
{
SetEnablePlusBtn(_isEnable: false);
_buttonMax.isEnabled = false;
}
else
{
SetEnablePlusBtn(_isEnable: true);
_buttonMax.isEnabled = true;
}
if (_buyNum <= 1)
{
SetEnableMinusBtn(_isEnable: false);
}
else
{
SetEnableMinusBtn(_isEnable: true);
}
ShopCommonUtility.SetButtonLabelStyle(_buttonMax, _labelBtnMax);
if (_isOverrideDisableMaxLabelColor && !_buttonMax.isEnabled)
{
_labelBtnMax.color = _maxLabelOverrideColor;
}
}
}

View File

@@ -1,106 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace Wizard;
public class SelectCardPurchaseConfirmDialog : MonoBehaviour
{
[SerializeField]
private UIScrollView _scrollView;
[SerializeField]
private PurchaseConfirm _objPurchaseConfirm;
[SerializeField]
private UILabel _listHeaderLabel;
[SerializeField]
private UILabel _labelSelectCardList;
[SerializeField]
private UILabel _labelAcquiredSkinWarning;
[SerializeField]
private UISprite _spriteLine;
private DialogBase _dialog;
public static void Create(PackConfig packConfig, PackChildGachaInfo gachaInfo, int buyPackNum, List<int> selectCardIdList, Action onDecide, bool isAcquireSkinCardPack, bool hasTargetSkin = false)
{
DialogBase dialog = UIManager.GetInstance().CreateDialogClose();
(UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/Dialog/SelectCardPurchaseConfirmDialog")) as GameObject).GetComponent<SelectCardPurchaseConfirmDialog>().Initialize(dialog, packConfig, gachaInfo, buyPackNum, selectCardIdList, onDecide, isAcquireSkinCardPack, hasTargetSkin);
}
private void Initialize(DialogBase dialog, PackConfig packConfig, PackChildGachaInfo gachaInfo, int buyPackNum, List<int> selectCardIdList, Action onDecide, bool isAcquireSkinCardPack, bool hasTargetSkin)
{
_dialog = dialog;
InitDialog(onDecide);
SetPurchaseConfirm(packConfig, gachaInfo, buyPackNum);
string key = (isAcquireSkinCardPack ? "Shop_0259" : "Shop_0199");
_listHeaderLabel.text = Data.SystemText.Get(key);
SetSelectCardList(selectCardIdList, hasTargetSkin);
_scrollView.ResetPosition();
}
private void InitDialog(Action onDecide)
{
_dialog.SetSize(DialogBase.Size.M);
_dialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn);
_dialog.SetButtonText(Data.SystemText.Get("Shop_0082"));
_dialog.ClickSe_Btn1 = 0;
_dialog.SetButtonDelegate(delegate
{
onDecide();
});
_dialog.SetPanelDepth(100);
_dialog.SetObj(base.gameObject);
}
private void SetPurchaseConfirm(PackConfig packConfig, PackChildGachaInfo gachaInfo, int buyPackNum)
{
_dialog.SetTitleLabel(packConfig.Title);
int useItemNum = gachaInfo.Cost * buyPackNum;
string purchaseText = Data.SystemText.Get("Shop_0101", packConfig.Title);
_objPurchaseConfirm.SetClystalConfirmDialog(useItemNum, purchaseText, PlayerStaticData.UserCrystalCount, packConfig.ExpirtyInfo);
if (packConfig.GachaPointData != null)
{
GachaPointData gachaPointData = packConfig.GachaPointData;
int num = gachaPointData.IncreaseGachaPoint;
if (gachaInfo.OverrideIncreaseGachaPoint > 0)
{
num = gachaInfo.OverrideIncreaseGachaPoint;
}
int num2 = (packConfig.IsSpecialCardPack ? num : (num * buyPackNum));
StartCoroutine(_objPurchaseConfirm.SetCardPackPoint(gachaPointData.GachaPoint, gachaPointData.GachaPoint + num2));
}
}
private void SetSelectCardList(List<int> selectCardIdList, bool hasTargetSkin)
{
if (selectCardIdList.Count == 0)
{
_labelSelectCardList.gameObject.SetActive(value: false);
}
_labelSelectCardList.gameObject.SetActive(value: true);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < selectCardIdList.Count; i++)
{
if (i > 0)
{
stringBuilder.Append("\n");
}
stringBuilder.Append(UserGoods.getUserGoodsName(UserGoods.Type.Card, selectCardIdList[i]));
}
_labelSelectCardList.text = stringBuilder.ToString();
if (hasTargetSkin)
{
_labelAcquiredSkinWarning.gameObject.SetActive(value: true);
_labelAcquiredSkinWarning.text = Data.SystemText.Get("Shop_0166");
_spriteLine.bottomAnchor.absolute = -43;
_spriteLine.topAnchor.absolute = -35;
}
}
}

View File

@@ -1,379 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Cute;
using UnityEngine;
using Wizard.UI.Common;
namespace Wizard;
public class SelectSkinCardDialog : MonoBehaviour
{
[SerializeField]
private SimpleScrollViewUI _cardListScrollView;
[SerializeField]
private TabList _tabListClass;
[SerializeField]
private UISprite _spriteClassTab;
private List<string> _loadedResourceList = new List<string>();
private UIAtlas _atlasProfile;
private List<UIBase_CardManager.CardObjData> _cardObjectList;
[SerializeField]
private GameObject _cardObjectRoot;
[SerializeField]
private GameObject _cardDetailRoot;
private CardDetailUI _cardDetail;
private List<string> _loadedCardResourceList = new List<string>();
private int _cardDetailIndex;
[SerializeField]
private UIButton _btnExclude;
private DialogBase _dialog;
private CardBasePrm.ClanType _displayClassType = CardBasePrm.ClanType.MAX;
private Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>> _selectSkinCardListInClassDic = new Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>>();
private Dictionary<int, bool> _selectCardStateDict;
private bool _isAcquireSkinCardPack;
private Action<int, bool> _onClickAcquireButton;
public static void Create(Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>> selectSkinCardListInClassDic, Action<Dictionary<int, bool>> onClickOk, bool isDefaultExclude, bool isAcquireSkinCardPack, Action<int, bool> onClickAcquireButton)
{
DialogBase dialog = UIManager.GetInstance().CreateDialogClose();
(UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/Dialog/SelectSkinCardDialog")) as GameObject).GetComponent<SelectSkinCardDialog>().Initialize(dialog, selectSkinCardListInClassDic, onClickOk, isDefaultExclude, isAcquireSkinCardPack, onClickAcquireButton);
}
public void Initialize(DialogBase dialog, Dictionary<CardBasePrm.ClanType, List<SelectSkinCardInfo>> selectSkinCardListInClassDic, Action<Dictionary<int, bool>> onClickOk, bool isDefaultExclude, bool isAcquireSkinCardPack, Action<int, bool> onClickAcquireButton)
{
_dialog = dialog;
_selectSkinCardListInClassDic = selectSkinCardListInClassDic;
_isAcquireSkinCardPack = isAcquireSkinCardPack;
_onClickAcquireButton = onClickAcquireButton;
InitDialog(onClickOk);
InitCardDetail();
if (_isAcquireSkinCardPack)
{
_btnExclude.gameObject.SetActive(value: false);
UIUtil.SetPositionY(_tabListClass.transform, -255f);
_cardListScrollView.SetScrollViewLayoutByAcquireSkinCardPack();
}
else
{
InitializeSelectSkinCardState(isDefaultExclude);
_btnExclude.onClick.Add(new EventDelegate(delegate
{
ExcludeSkinCardAlreadyHave();
}));
}
StartCoroutine(LoadInitialResources(delegate
{
InitClassTab();
}));
}
private void InitDialog(Action<Dictionary<int, bool>> onClickOk)
{
_dialog.SetSize(DialogBase.Size.XL);
_dialog.SetLayer("MyPage");
_dialog.SetPanelSortingOrder(37);
_dialog.SetPanelDepth(900);
if (_isAcquireSkinCardPack)
{
_dialog.SetTitleLabel(Data.SystemText.Get("Shop_0258"));
_dialog.SetButtonLayout(DialogBase.ButtonLayout.NONE);
}
else
{
_dialog.SetTitleLabel(Data.SystemText.Get("Shop_0194"));
_dialog.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
_dialog.SetButtonDelegate(delegate
{
onClickOk.Call(_selectCardStateDict);
});
}
_dialog.SetObj(base.gameObject);
}
private IEnumerator LoadInitialResources(Action onFinish)
{
UIManager.GetInstance().createInSceneCenterLoading();
yield return StartCoroutine(LoadProfileAtlas());
UIManager.GetInstance().closeInSceneCenterLoading();
onFinish.Call();
}
private IEnumerator LoadProfileAtlas()
{
string profileAtlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null);
yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(profileAtlasName, null));
_loadedResourceList.Add(profileAtlasName);
profileAtlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null, isload: true);
_atlasProfile = Toolbox.ResourcesManager.LoadObject<GameObject>(profileAtlasName).GetComponent<UIAtlas>();
}
private void InitCardDetail()
{
_cardDetail = DialogCreator.CreateCardDetailDialog(_cardDetailRoot, "Detail");
_cardDetail.OnDragCard = CardDetailDragCallback;
_cardDetail.OnDetailCardUpdate = UpdateCardDetailArrowButtonVisible;
_cardDetail.gameObject.SetActive(value: false);
}
private void CardDetailDragCallback(Vector2 vec)
{
if (!_cardDetail.IsEnableShowDetail)
{
return;
}
float x = vec.x;
if (!(Mathf.Abs(x) < 70f))
{
int num = _cardDetailIndex + ((!(x > 0f)) ? 1 : (-1));
if (num >= 0 && _cardObjectList.Count > num)
{
_cardDetail.CloseDefault(playSe: false);
_cardDetail.ShowCardDetail(_cardObjectList[num].CardObj);
_cardDetailIndex = num;
UpdateCardDetailArrowButtonVisible();
}
}
}
private void UpdateCardDetailArrowButtonVisible()
{
_cardDetail.LeftButtonVisible = _cardDetailIndex > 0;
_cardDetail.RightButtonVisible = _cardDetailIndex < _cardObjectList.Count - 1;
}
private IEnumerator LoadCardObject(List<int> cardIdList, Action onFinish)
{
if (cardIdList.Count == 0)
{
onFinish.Call();
yield break;
}
UnloadCardObject();
UIManager uiMgr = UIManager.GetInstance();
uiMgr.createInSceneCenterLoading();
bool isLoaded = false;
uiMgr.CardLoadSelect(null, cardIdList, base.gameObject.layer, is2D: true, delegate
{
isLoaded = true;
});
while (!isLoaded)
{
yield return null;
}
InitCardObject();
uiMgr.closeInSceneCenterLoading();
onFinish.Call();
}
private void InitCardObject()
{
List<UIBase_CardManager.CardObjData> cardList2DObjs = UIManager.GetInstance().getCardList2DObjs();
_cardObjectList = new List<UIBase_CardManager.CardObjData>(cardList2DObjs);
cardList2DObjs.Clear();
List<string> cardListAssetPathList = Toolbox.ResourcesManager.CardListAssetPathList;
_loadedCardResourceList.AddRange(new List<string>(cardListAssetPathList));
cardListAssetPathList.Clear();
if (_cardObjectList == null)
{
return;
}
for (int i = 0; i < _cardObjectList.Count; i++)
{
GameObject cardObject = _cardObjectList[i].CardObj;
cardObject.SetActive(value: false);
UITexture[] componentsInChildren = cardObject.GetComponentsInChildren<UITexture>();
foreach (UITexture uITexture in componentsInChildren)
{
if (uITexture.name.Contains("CardTexture"))
{
UITexture component = uITexture.GetComponent<UITexture>();
Material material = component.material;
component.mainTexture = material.mainTexture;
component.material = null;
}
}
cardObject.transform.parent = _cardObjectRoot.transform;
CardListTemplate component2 = cardObject.GetComponent<CardListTemplate>();
component2.HideNum();
component2._newLabel.gameObject.SetActive(value: false);
component2.SetId(_cardObjectList[i].ids);
component2.SetScale(0.36f);
component2.AddDepth(20);
int tempIndex = i;
component2.AddColliderToFrame(0.9f).onClick = delegate
{
_cardDetailIndex = tempIndex;
_cardDetail.OnPushCardDetailOn(cardObject);
};
}
}
private void UnloadCardObject()
{
Toolbox.ResourcesManager.RemoveAssetGroup(_loadedCardResourceList);
_loadedCardResourceList.Clear();
if (_cardObjectList != null)
{
for (int i = 0; i < _cardObjectList.Count; i++)
{
UnityEngine.Object.Destroy(_cardObjectList[i].CardObj.gameObject);
}
_cardObjectList.Clear();
}
}
private void InitClassTab()
{
_spriteClassTab.atlas = _atlasProfile;
int num = 0;
for (int i = 1; i < 9; i++)
{
CardBasePrm.ClanType classType = (CardBasePrm.ClanType)i;
string spriteBaseName = "class_tab_" + i.ToString("00");
_tabListClass.AddTab(delegate
{
if (classType != _displayClassType)
{
ShowCardList(classType);
}
}, spriteBaseName).name = "Class_" + i + "(Clone)";
if (_selectSkinCardListInClassDic[classType].Count == 0)
{
int num2 = i - 1;
_tabListClass.SetTabToGrayByIndex(num2, disable: true);
if (num == num2)
{
num++;
}
}
}
_tabListClass.Reset();
_tabListClass.SelectTabByIndex(num, isForceSet: true);
}
private void ShowCardList(CardBasePrm.ClanType classType)
{
_displayClassType = classType;
List<SelectSkinCardInfo> cardList = _selectSkinCardListInClassDic[_displayClassType];
_cardListScrollView.SetVisiable(isVisiable: false);
List<int> list = new List<int>(cardList.Count);
CardMaster instance = CardMaster.GetInstance(CardMaster.CardMasterId.Default);
for (int i = 0; i < cardList.Count; i++)
{
CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardList[i].CardId);
list.Add(cardParameterFromId.ResourceCardId);
}
StartCoroutine(LoadCardObject(list, delegate
{
_cardListScrollView.SetVisiable(isVisiable: true);
_cardListScrollView.CreateScrollView(cardList.Count, InitializePlate);
}));
}
private void InitializePlate(int index, GameObject plate)
{
List<SelectSkinCardInfo> list = _selectSkinCardListInClassDic[_displayClassType];
if (index >= list.Count)
{
plate.SetActive(value: false);
}
else
{
plate.GetComponent<SelectSkinCardPlate>().SetData(list[index], OnClickSelectCardToggle, _selectCardStateDict, _cardObjectList[index].CardObj, _cardObjectRoot, _isAcquireSkinCardPack ? new Action<int, bool>(OnClickAcquireButton) : null);
}
}
private void InitializeSelectSkinCardState(bool isDefaultExclude)
{
_selectCardStateDict = new Dictionary<int, bool>();
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.MIN; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
List<SelectSkinCardInfo> list = _selectSkinCardListInClassDic[clanType];
for (int i = 0; i < list.Count; i++)
{
bool value = true;
if (isDefaultExclude)
{
value = !list[i].HasSkin;
}
_selectCardStateDict.Add(list[i].CardId, value);
}
}
UpdateDialogOkBtn();
UpdateExcludeBtn();
}
private void ExcludeSkinCardAlreadyHave()
{
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.MIN; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
List<SelectSkinCardInfo> list = _selectSkinCardListInClassDic[clanType];
for (int i = 0; i < list.Count; i++)
{
_selectCardStateDict[list[i].CardId] = !list[i].HasSkin;
}
}
List<SelectSkinCardPlate> list2 = _cardListScrollView.ActivePlateList.Select((GameObject p) => p.GetComponent<SelectSkinCardPlate>()).ToList();
for (int num = 0; num < list2.Count; num++)
{
list2[num].SetSelectStatus(_selectCardStateDict, isOnClickToggle: false);
}
UpdateDialogOkBtn();
UpdateExcludeBtn();
}
private void OnClickSelectCardToggle(int cardId, bool isSelect, SelectSkinCardPlate plate)
{
_selectCardStateDict[cardId] = isSelect;
plate.SetSelectStatus(_selectCardStateDict, isOnClickToggle: true);
UpdateDialogOkBtn();
UpdateExcludeBtn();
}
private void UpdateDialogOkBtn()
{
UIManager.SetObjectToGrey(_dialog.button1.gameObject, _selectCardStateDict.All((KeyValuePair<int, bool> x) => !x.Value));
}
private void UpdateExcludeBtn()
{
bool b = true;
for (CardBasePrm.ClanType clanType = CardBasePrm.ClanType.MIN; clanType < CardBasePrm.ClanType.MAX; clanType++)
{
if (_selectSkinCardListInClassDic[clanType].Any((SelectSkinCardInfo x) => x.HasSkin && _selectCardStateDict[x.CardId]))
{
b = false;
break;
}
}
UIManager.SetObjectToGrey(_btnExclude.gameObject, b);
}
private void OnClickAcquireButton(int cardId, bool hasSkin)
{
_onClickAcquireButton.Call(cardId, hasSkin);
_dialog.Close();
}
}

View File

@@ -1,36 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using LitJson;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class SelectSkinCardInfo
{
public int CardId { get; private set; }
public CardBasePrm.ClanType Class { get; private set; }
public int SkinId { get; private set; }
public bool HasSkin { get; private set; }
public List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> RewardList { get; private set; }
public SelectSkinCardInfo(JsonData data, CardBasePrm.ClanType classType)
{
CardId = data["card_id"].ToInt();
Class = classType;
SkinId = data["leader_skin_id"].ToInt();
HasSkin = data["has_leader_skin"].ToBoolean();
RewardList = new List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward>();
if (!data.TryGetValue("reward_list", out var value))
{
return;
}
foreach (JsonData item in (IEnumerable)value)
{
RewardList.Add(new Wizard.Scripts.Network.Data.TaskData.Arena.Reward(item));
}
}
}

View File

@@ -1,212 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class SelectSkinCardPlate : MonoBehaviour
{
private readonly Quaternion CARDOBJECT_ROTATION_QUATERNION = new Quaternion(0f, 0f, 0f, 0f);
[SerializeField]
private GameObject _objCardRoot;
[SerializeField]
private UILabel _labelAcquiredOnCard;
[SerializeField]
private UILabel _labelCardName;
[SerializeField]
private UILabel _labelCardPossessionNum;
[SerializeField]
private UILabel _labelCardPossessionNumNormal;
[SerializeField]
private UILabel _labelCardPossessionNumPremium;
[SerializeField]
private UIToggle _toggleSelect;
[SerializeField]
private UILabel _labelToggle;
[SerializeField]
private UILabel _labelDescription;
[SerializeField]
private UILabel _labelAcquired;
[SerializeField]
private UIButton _buttonAcquire;
private GameObject _cardObject;
private SelectSkinCardInfo _skinCardInfo;
private bool _isFirstToggleChange = true;
private bool _isSetValue;
public void SetData(SelectSkinCardInfo skinCardInfo, Action<int, bool, SelectSkinCardPlate> onClickSelectToggle, Dictionary<int, bool> selectCardStateDict, GameObject cardObject, GameObject evacuationParent, Action<int, bool> onClickAcquireButton)
{
_skinCardInfo = skinCardInfo;
_labelCardName.text = UserGoods.getUserGoodsName(UserGoods.Type.Card, _skinCardInfo.CardId);
DataMgr dataMgr = null; // Pre-Phase-5b: headless has no DataMgr
int possessionCardNum = dataMgr.GetPossessionCardNum(_skinCardInfo.CardId, isIncludingSpotCard: false);
int spotCardNum = dataMgr.SpotCardData.GetSpotCardNum(_skinCardInfo.CardId);
_labelCardPossessionNumNormal.text = possessionCardNum + ((spotCardNum > 0) ? $"[fcd24a]+{spotCardNum}[-]" : string.Empty);
int cardId = _skinCardInfo.CardId + 1;
int possessionCardNum2 = dataMgr.GetPossessionCardNum(cardId, isIncludingSpotCard: false);
_labelCardPossessionNumPremium.text = possessionCardNum2.ToString();
int num = possessionCardNum + possessionCardNum2 + spotCardNum;
_labelCardPossessionNum.text = num.ToString();
SetLabel(skinCardInfo);
SetCardObject(cardObject, evacuationParent);
if (onClickAcquireButton != null)
{
_buttonAcquire.gameObject.SetActive(value: true);
_buttonAcquire.onClick.Clear();
_buttonAcquire.onClick.Add(new EventDelegate(delegate
{
onClickAcquireButton(_skinCardInfo.CardId, _skinCardInfo.HasSkin);
}));
_toggleSelect.gameObject.SetActive(value: false);
_labelToggle.gameObject.SetActive(value: false);
_labelAcquiredOnCard.gameObject.SetActive(value: false);
return;
}
UIManager.SetObjectToGrey(_toggleSelect.gameObject, !_skinCardInfo.HasSkin);
UIManager.SetObjectToGrey(_labelToggle.gameObject, !_skinCardInfo.HasSkin);
if (!_toggleSelect.value)
{
_toggleSelect.activeSprite.alpha = 0f;
}
_toggleSelect.onChange.Clear();
_toggleSelect.onChange.Add(new EventDelegate(delegate
{
if (!_isFirstToggleChange)
{
onClickSelectToggle(_skinCardInfo.CardId, !_toggleSelect.value, this);
}
_isFirstToggleChange = false;
}));
SetSelectStatus(selectCardStateDict, isOnClickToggle: false);
if (_buttonAcquire != null)
{
_buttonAcquire.gameObject.SetActive(value: false);
}
}
private void SetLabel(SelectSkinCardInfo skinCardInfo)
{
_labelDescription.text = GetRewardListText(skinCardInfo);
_labelAcquired.gameObject.SetActive(skinCardInfo.HasSkin);
_labelAcquired.text = Data.SystemText.Get("Shop_0166");
}
private static string GetRewardListText(SelectSkinCardInfo skinCardInfo)
{
List<string> list = skinCardInfo.RewardList.Select((Wizard.Scripts.Network.Data.TaskData.Arena.Reward reward) => reward.UserGoodsData).OrderBy(GachaUtil.GetRewardListSortIndex).Select(GachaUtil.GetRewardListGoodsTypeName)
.Distinct()
.ToList();
if (list.Count == 0)
{
Debug.LogError($"reward is not set : {skinCardInfo.CardId} {UserGoods.getUserGoodsName(UserGoods.Type.Card, skinCardInfo.CardId)}");
return string.Empty;
}
return UIUtil.CreateListText(list, Data.SystemText.Get("Shop_0226"), Data.SystemText.Get("Shop_0234"));
}
public void SetSelectStatus(Dictionary<int, bool> selectCardStateDict, bool isOnClickToggle)
{
if (!_isSetValue)
{
_isSetValue = true;
_toggleSelect.value = !selectCardStateDict[_skinCardInfo.CardId];
if (isOnClickToggle)
{
}
if (_cardObject != null)
{
SetObjectToGreyEnableCollider(_cardObject, !selectCardStateDict[_skinCardInfo.CardId]);
_labelAcquiredOnCard.gameObject.SetActive(!selectCardStateDict[_skinCardInfo.CardId]);
}
_isSetValue = false;
}
}
private void SetCardObject(GameObject cardObject, GameObject evacuationParent)
{
if (_cardObject != null)
{
_cardObject.SetActive(value: false);
_cardObject.transform.parent = evacuationParent.transform;
}
cardObject.transform.parent = _objCardRoot.transform;
cardObject.transform.localPosition = Vector3.zero;
cardObject.transform.rotation = CARDOBJECT_ROTATION_QUATERNION;
cardObject.SetActive(value: true);
_cardObject = cardObject;
}
private void SetObjectToGreyEnableCollider(GameObject o, bool b)
{
Color color = (b ? LabelDefine.TEXT_COLOR_BUTTON_DISABLE : LabelDefine.TEXT_COLOR_BUTTON_ENABLE);
Color color2 = (b ? LabelDefine.TEXT_COLOR_BUTTON_DISABLE : ((Color32)Color.white));
string text = "_grey";
if (b)
{
if (!o.name.Contains(text))
{
o.name += text;
}
}
else
{
o.name = o.name.Replace(text, "");
}
UISprite[] components = o.GetComponents<UISprite>();
for (int i = 0; i < components.Length; i++)
{
components[i].color = color2;
}
UITexture[] componentsInChildren = o.GetComponentsInChildren<UITexture>(includeInactive: true);
for (int i = 0; i < componentsInChildren.Length; i++)
{
componentsInChildren[i].color = color2;
}
components = o.GetComponentsInChildren<UISprite>(includeInactive: true);
for (int i = 0; i < components.Length; i++)
{
components[i].color = color2;
}
UIWidget[] componentsInChildren2 = o.GetComponentsInChildren<UIWidget>(includeInactive: true);
for (int i = 0; i < componentsInChildren2.Length; i++)
{
componentsInChildren2[i].color = color2;
}
UIButton[] componentsInChildren3 = o.GetComponentsInChildren<UIButton>(includeInactive: true);
foreach (UIButton obj in componentsInChildren3)
{
obj.defaultColor = color2;
obj.disabledColor = color2;
}
UILabel[] componentsInChildren4 = o.GetComponentsInChildren<UILabel>(includeInactive: true);
for (int i = 0; i < componentsInChildren4.Length; i++)
{
componentsInChildren4[i].color = color;
}
TweenColor[] componentsInChildren5 = o.GetComponentsInChildren<TweenColor>(includeInactive: true);
foreach (TweenColor obj2 in componentsInChildren5)
{
obj2.from = color2;
obj2.to = color2;
}
}
}

View File

@@ -40,14 +40,6 @@ public class ShopDrumrollScrollItem : MonoBehaviour
} }
} }
public void SetActiveBadge(bool isActive)
{
if (!(_objBadge == null) && _objBadge.activeSelf != isActive)
{
_objBadge.SetActive(isActive);
}
}
public void SetActivePrereleaseMark(bool isActive) public void SetActivePrereleaseMark(bool isActive)
{ {
if (_objPrerelease == null) if (_objPrerelease == null)

View File

@@ -59,27 +59,6 @@ public class SimpleScrollViewUI : MonoBehaviour
SetScrollView(indexes); SetScrollView(indexes);
} }
public void SetVisiable(bool isVisiable)
{
_scrollView.gameObject.SetActive(isVisiable);
_scrollBarWrapContent.gameObject.SetActive(isVisiable);
if (_plateOriginal != null)
{
_plateOriginal.gameObject.SetActive(isVisiable);
}
else
{
if (_plateOriginals == null)
{
return;
}
foreach (GameObject plateOriginal in _plateOriginals)
{
plateOriginal.SetActive(isVisiable);
}
}
}
private void InitPlateList() private void InitPlateList()
{ {
for (int i = 0; i < _plateList.Count; i++) for (int i = 0; i < _plateList.Count; i++)
@@ -213,27 +192,4 @@ public class SimpleScrollViewUI : MonoBehaviour
_ => 0f, _ => 0f,
}; };
} }
public void SetScrollViewLayoutByAcquireSkinCardPack()
{
SCROLL_OBJECT_NUM = 5;
Transform obj = base.transform.Find("List");
UIUtil.SetPositionY(obj, 0f);
UIPanel component = obj.GetComponent<UIPanel>();
Vector4 baseClipRegion = component.baseClipRegion;
baseClipRegion.w = 472f;
component.baseClipRegion = baseClipRegion;
Transform obj2 = obj.transform.Find("AllScrollBG");
UIUtil.SetPositionY(obj2, -5f);
BoxCollider component2 = obj2.GetComponent<BoxCollider>();
Vector3 size = component2.size;
size.y = 472f;
component2.size = size;
_scrollBarWrapContent.foregroundWidget.height = 400;
_scrollBarWrapContent.backgroundWidget.height = 400;
UIPanel component3 = _scrollView.GetComponent<UIPanel>();
Vector4 baseClipRegion2 = component3.baseClipRegion;
baseClipRegion2.w = 443f;
component3.baseClipRegion = baseClipRegion2;
}
} }

View File

@@ -1,84 +0,0 @@
using System;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class StarterClassSelectDialog : MonoBehaviour
{
[SerializeField]
public GameObject StarterPurchaseConfirmationDialog;
[SerializeField]
private List<GameObject> _class;
private List<UISprite> _classSprites;
private int _selectedClassId = -1;
[SerializeField]
private GameObject _selectFrame;
[SerializeField]
private UITexture _logoTexture;
public void Init(DialogBase inDialog, PackConfig packConfig, PackChildGachaInfo info, int localSelectedClassId, Action<PackConfig, PackChildGachaInfo, int, int[], CardBasePrm.ClanType, int?> onPurchase, Action<int> onPushOk)
{
inDialog.SetSize(DialogBase.Size.M);
inDialog.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
inDialog.SetTitleLabel(Data.SystemText.Get("Shop_0239"));
inDialog.onPushButton1 = delegate
{
PackSetRotationStarterClassTask packSetRotationStarterClassTask = new PackSetRotationStarterClassTask();
packSetRotationStarterClassTask.SetParameter(packConfig.PackId, _selectedClassId);
StartCoroutine(Toolbox.NetworkManager.Connect(packSetRotationStarterClassTask, delegate
{
onPushOk.Call(_selectedClassId);
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
GameObject gameObject = UnityEngine.Object.Instantiate(StarterPurchaseConfirmationDialog);
dialogBase.SetObj(gameObject);
gameObject.GetComponent<StarterPurchaseConfirmationDialog>().Init(dialogBase, _selectedClassId, packConfig, info, onPurchase);
}));
};
_logoTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(packConfig.GetPackTitleLogoTexturePath(isFetch: true)) as Texture;
UIManager.GetInstance().AttachAtlas(_class);
_classSprites = new List<UISprite>();
for (int num = 0; num < _class.Count; num++)
{
_classSprites.Add(_class[num].GetComponent<UISprite>());
SetEventOnClickBtn(_class[num], num + 1);
}
int classId = ((localSelectedClassId == 10) ? packConfig.SelectedClassId : localSelectedClassId);
SelectClass(classId, playSE: false);
}
private void SetEventOnClickBtn(GameObject btn, int index)
{
UIEventListener.Get(btn).onClick = delegate
{
SelectClass(index);
};
}
private void SelectClass(int classId, bool playSE = true)
{
if (classId < 9 && classId >= 1)
{
if (playSE)
{
}
if (classId != _selectedClassId)
{
_selectedClassId = classId;
SetSelectedFrame(_classSprites[classId - 1].gameObject);
}
}
}
private void SetSelectedFrame(GameObject selectedClass)
{
_selectFrame.transform.localPosition = selectedClass.transform.localPosition;
}
}

View File

@@ -1,125 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class StarterPurchaseConfirmationDialog : MonoBehaviour
{
[SerializeField]
private UILabel _packPriceLabel;
[SerializeField]
private UILabel _packConfirmLabel;
[SerializeField]
private UILabel _currentClassLabel;
[SerializeField]
private UILabel _labelAfterItemUnit;
[SerializeField]
private UILabel _cautionLabel;
[SerializeField]
private UILabel _haveCrystalBefore;
[SerializeField]
private UILabel _haveCrystalAfter;
[SerializeField]
private UILabel _freePackBeforeCountLabel;
[SerializeField]
private UILabel _freePackAfterCountLabel;
[SerializeField]
private UIButton _jpnLawButton;
[SerializeField]
private UILabel _saleTimeLabel;
[SerializeField]
private UISprite _jpaLawLine;
[SerializeField]
private GameObject _crystalLayoutRoot;
[SerializeField]
private UILabel _freePackTitleLabel;
[SerializeField]
private GameObject _freeBuyLayoutRoot;
[SerializeField]
private CenteringUIWidget _freeCountCenter;
[SerializeField]
private UITable _freeCountTable;
[SerializeField]
private UIScrollBar _scrollBar;
[SerializeField]
private UIScrollView _scrollView;
public void Init(DialogBase inDialog, int selectedClassId, PackConfig packConfig, PackChildGachaInfo info, Action<PackConfig, PackChildGachaInfo, int, int[], CardBasePrm.ClanType, int?> onPurchase)
{
inDialog.SetSize(DialogBase.Size.M);
inDialog.SetTitleLabel(packConfig.Title);
inDialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn);
SetTextAndLabels(inDialog, selectedClassId, packConfig, info);
inDialog.onPushButton1 = delegate
{
onPurchase.Call(packConfig, info, 10, null, (CardBasePrm.ClanType)selectedClassId, null);
};
inDialog.ClickSe_Btn1 = 0;
_jpnLawButton.onClick.Add(new EventDelegate(delegate
{
UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.LEGALTEXT);
}));
_jpaLawLine.gameObject.SetActive(value: true);
if (packConfig.ExpirtyInfo.IsEnableText)
{
_saleTimeLabel.text = packConfig.ExpirtyInfo.GetText();
}
else
{
_saleTimeLabel.gameObject.SetActive(value: false);
}
_crystalLayoutRoot.SetActive(!info.IsFreePack);
_freeBuyLayoutRoot.SetActive(info.IsFreePack);
if (info.IsFreePack)
{
int num = info.AvailableCount / info.PackCountBuyPer;
_freePackBeforeCountLabel.text = num.ToString();
_freePackAfterCountLabel.text = (num - 1).ToString();
_freePackTitleLabel.text = Data.SystemText.Get("Shop_0224");
_freePackTitleLabel.ProcessText();
_freeCountTable.Reposition();
_freeCountCenter.Reposition();
}
_jpnLawButton.gameObject.SetActive(value: false);
_saleTimeLabel.gameObject.SetActive(value: false);
_jpaLawLine.gameObject.SetActive(value: false);
_scrollBar.gameObject.SetActive(value: false);
_scrollView.enabled = false;
}
private void SetTextAndLabels(DialogBase inDialog, int selectedClassId, PackConfig packConfig, PackChildGachaInfo info)
{
int num = 10 * info.Cost;
inDialog.SetButtonText(Data.SystemText.Get("Shop_0082"));
string clanNameByKey = selectedClassId.ToString(); // Pre-Phase-5b: no clan-name lookup
_packPriceLabel.text = Data.SystemText.Get("Shop_0241", num.ToString());
_packConfirmLabel.text = Data.SystemText.Get("Shop_0242", packConfig.Title);
_currentClassLabel.text = Data.SystemText.Get("Shop_0243", clanNameByKey);
_cautionLabel.text = Data.SystemText.Get("Shop_0244", clanNameByKey);
_labelAfterItemUnit.text = Data.SystemText.Get("Card_0100");
int userCrystalCount = PlayerStaticData.UserCrystalCount;
int num2 = userCrystalCount - 10 * info.Cost;
_haveCrystalBefore.text = userCrystalCount.ToString();
_haveCrystalAfter.text = num2.ToString();
}
}

View File

@@ -12,6 +12,5 @@ public class UIAtlasManager
{ {
Battle, Battle,
BattleLang, BattleLang,
Profile,
CardFramePhantom} CardFramePhantom}
} }

View File

@@ -1,131 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public class UIParticleEffectGroup : MonoBehaviour
{
private struct AutoUpdateInfo
{
public GameObject Effect { get; private set; }
public GameObject Parent { get; private set; }
public AutoUpdateInfo(GameObject effect, GameObject parent)
{
Effect = effect;
Parent = parent;
}
}
[SerializeField]
private Camera _camera;
[SerializeField]
private GameObject _effectParentRoot;
private List<AutoUpdateInfo> _updateList = new List<AutoUpdateInfo>();
private RenderTexture _renderTexture;
private UITexture _uiTexture;
private int _saveScreenWidth;
private int _saveScreenHeight;
private GameObject CreateParent()
{
GameObject obj = new GameObject();
Transform obj2 = obj.transform;
obj2.parent = _effectParentRoot.transform;
obj2.localPosition = Vector3.zero;
obj2.localScale = Vector3.one;
obj.layer = base.gameObject.layer;
return obj;
}
public void Initialize(UITexture uiTexture)
{
_uiTexture = uiTexture;
}
private Vector3 DecideEffectLocalPosition(GameObject target)
{
Vector3 zero = Vector3.zero;
while (target != null)
{
zero += target.transform.localPosition;
target = target.transform.parent.gameObject;
if (target.GetComponent<Camera>() != null)
{
break;
}
}
return zero;
}
public void StartEffect(Effect2dCreateParam param, bool isEnableUpdateReposition)
{
GameObject parent = param.Parent;
GameObject gameObject = CreateParent();
gameObject.transform.localPosition = DecideEffectLocalPosition(param.Parent);
gameObject.transform.localRotation = param.Parent.transform.localRotation;
gameObject.transform.localScale = Vector3.one;
param.Parent = gameObject;
GameObject gameObject2 = EffectUtility.CreateEffect2D(param);
gameObject2.SetLayer(gameObject.layer, isSetChildren: true);
gameObject2.transform.localPosition = Vector3.zero;
SetEffectCommonSetting(gameObject2);
gameObject2.SetActive(value: true);
if (isEnableUpdateReposition)
{
_updateList.Add(new AutoUpdateInfo(gameObject, parent));
}
}
private void SetEffectCommonSetting(GameObject effect)
{
UpdateRenderTexture();
UpdateUITextureSize(_uiTexture);
}
private void UpdateRenderTexture()
{
if (_renderTexture != null)
{
Object.Destroy(_renderTexture);
}
_saveScreenWidth = UIManager.GetInstance().FrontCameraPixelWidth;
_saveScreenHeight = UIManager.GetInstance().FrontCameraPixelHeight;
float num = UIManager.GetInstance().FrontCameraPixelWidth;
float num2 = (float)UIManager.GetInstance().FrontCameraPixelHeight / num;
_renderTexture = new RenderTexture(2048, (int)(2048f * num2), 0, RenderTextureFormat.ARGB32);
_renderTexture.name = "UIPG" + _uiTexture.name;
_camera.targetTexture = _renderTexture;
_uiTexture.mainTexture = _renderTexture;
}
private void UpdateUITextureSize(UITexture uiTexture)
{
Camera frontCamera = UIManager.GetInstance().FrontCamera;
Vector3 position = new Vector3(0f, 1f, 0f);
Vector3 position2 = new Vector3(1f, 0f, 0f);
Vector3 position3 = frontCamera.ViewportToWorldPoint(position);
Vector3 position4 = frontCamera.ViewportToWorldPoint(position2);
Vector3 vector = uiTexture.transform.InverseTransformPoint(position3);
Vector3 vector2 = uiTexture.transform.InverseTransformPoint(position4);
uiTexture.width = (int)(vector2.x - vector.x);
uiTexture.height = (int)(vector.y - vector2.y);
uiTexture.shader = Shader.Find("Cygames/UI/Transparent ColoredAdd");
}
public void OnBeforeDestroy()
{
if (_uiTexture != null)
{
_uiTexture.mainTexture = null;
_uiTexture = null;
}
}
}

View File

@@ -1,45 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public class UIParticleEffectManager : MonoBehaviour
{
[SerializeField]
private GameObject _groupPrefab;
private static readonly Vector3 START_POSITION = new Vector3(4000f, 0f, 0f);
private static readonly Vector3 OFFSET_POSITION = new Vector3(4000f, 0f, 0f);
private int _groupCount;
private List<UIParticleEffectGroup> _groupList = new List<UIParticleEffectGroup>();
public static UIParticleEffectManager Instance { get; private set; }
private void Awake()
{
Instance = this;
}
public void Remove(UIParticleEffectGroup group)
{
if (_groupList.Remove(group))
{
group.OnBeforeDestroy();
Object.Destroy(group.gameObject);
}
}
public UIParticleEffectGroup CreateNewGroup(UITexture uiTexture)
{
GameObject obj = NGUITools.AddChild(base.gameObject, _groupPrefab);
UIParticleEffectGroup component = obj.GetComponent<UIParticleEffectGroup>();
component.Initialize(uiTexture);
obj.transform.localPosition = START_POSITION + OFFSET_POSITION * _groupCount;
_groupCount++;
_groupList.Add(component);
return component;
}
}

View File

@@ -106,29 +106,6 @@ public static class UIUtil
} }
} }
public static string CreateListText(IList<string> list, string separator, string header = null, string footer = null)
{
StringBuilder tempStringBuilder = GetTempStringBuilder();
if (header != null)
{
tempStringBuilder.Append(header);
}
if (list.Count > 0)
{
tempStringBuilder.Append(list[0]);
for (int i = 1; i < list.Count; i++)
{
tempStringBuilder.Append(separator);
tempStringBuilder.Append(list[i]);
}
}
if (footer != null)
{
tempStringBuilder.Append(footer);
}
return tempStringBuilder.ToString();
}
public static void AdjustClassInfoPartsSize(ClassInfoParts classInfoParts, FlexibleGrid grid, int widthMax) public static void AdjustClassInfoPartsSize(ClassInfoParts classInfoParts, FlexibleGrid grid, int widthMax)
{ {
grid.Reposition(); grid.Reposition();

View File

@@ -43,16 +43,6 @@ public class WebViewHelper
public DialogBase WebViewDialog => _webViewDialog; public DialogBase WebViewDialog => _webViewDialog;
public void OpenWebView(WebViewType webviewtype, ActionWebviewOpen cbWebviewOpen = null, Action cbWebviewClose = null, Action onButton1 = null, Action onCancel = null)
{
_OpenWebView(webviewtype, cbWebviewOpen, cbWebviewClose, 0, 0, null, "", onButton1, onCancel);
}
public void OpenGachaRateWebView(int ratePackId, int packCategory = 0)
{
_OpenWebView(WebViewType.GACHARATE, null, null, ratePackId, packCategory);
}
public void OpenAnnounceWebView(string announceId, Action<DialogBase> onDialogOpening = null) public void OpenAnnounceWebView(string announceId, Action<DialogBase> onDialogOpening = null)
{ {
_OpenWebView(WebViewType.ANNOUNCE, null, null, 0, 0, announceId, "", null, null, onDialogOpening); _OpenWebView(WebViewType.ANNOUNCE, null, null, 0, 0, announceId, "", null, null, onDialogOpening);

View File

@@ -4,12 +4,4 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace Wizard.UI.Common namespace Wizard.UI.Common
{ {
public partial class TabList
{
public Tab AddTab(UIEventListener.VoidDelegate onClick, string spriteBaseName) => default!;
public void Reset() { }
public void Reset(bool notSelectTab) { }
public void SelectTabByIndex(int index, bool isForceSet) { }
public void SetTabToGrayByIndex(int index, bool disable) { }
}
} }

View File

@@ -58,9 +58,6 @@ public partial class UIManager
public NguiObjs TextInputDialogPrefab { get; set; } public NguiObjs TextInputDialogPrefab { get; set; }
public DrumrollDialog DrumrollDialogPrefab { get; set; } public DrumrollDialog DrumrollDialogPrefab { get; set; }
public DialogBase NowOpenDialog { get; set; } public DialogBase NowOpenDialog { get; set; }
public Camera FrontCamera { get; set; }
public int FrontCameraPixelWidth { get; set; }
public int FrontCameraPixelHeight { get; set; }
public UIRoot UIRootSystem { get; set; } public UIRoot UIRootSystem { get; set; }
public GameObject SupportDialogPrefab { get; set; } public GameObject SupportDialogPrefab { get; set; }
public bool isBattleRecovery { get; set; } public bool isBattleRecovery { get; set; }
@@ -76,7 +73,6 @@ public partial class UIManager
public List<UIAtlas> GetAtlasList() => default!; public List<UIAtlas> GetAtlasList() => default!;
public void DestroyView(ViewScene scene) { } public void DestroyView(ViewScene scene) { }
public UIBase GetUIBase(ViewScene scene) => default!; public UIBase GetUIBase(ViewScene scene) => default!;
public T GetCurrentSceneParam<T>() where T : class => default!;
public void OverrideSceneParam(ViewScene scene, object sceneParam) { } public void OverrideSceneParam(ViewScene scene, object sceneParam) { }
public T GetSceneParam<T>(ViewScene scene) where T : class => default!; public T GetSceneParam<T>(ViewScene scene) where T : class => default!;
public void ChangeViewScene(ViewScene nextScene, ChangeViewSceneParam param = null, object sceneParam = null) { } public void ChangeViewScene(ViewScene nextScene, ChangeViewSceneParam param = null, object sceneParam = null) { }
@@ -93,8 +89,6 @@ public partial class UIManager
public DialogBase CreateConfirmationDialog(string message) => default!; public DialogBase CreateConfirmationDialog(string message) => default!;
public void dialogAllClear() { } public void dialogAllClear() { }
public bool isOpenDialog() => default!; public bool isOpenDialog() => default!;
public void createInSceneLoading(bool notBlack = false, bool notCollider = false, bool force = true, int playIndex = -1) { }
public void closeInSceneLoading(bool force = true) { }
public VfxBase CreateNowLoadingVfx(VfxBase loadResourcesVfx) => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance(); public VfxBase CreateNowLoadingVfx(VfxBase loadResourcesVfx) => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public void createInSceneCenterLoading(bool notBlack = false, bool notCollider = false, bool force = true, string overrideText = null) { } public void createInSceneCenterLoading(bool notBlack = false, bool notCollider = false, bool force = true, string overrideText = null) { }
public void closeInSceneCenterLoading(bool force = true, bool disableCollider = false) { } public void closeInSceneCenterLoading(bool force = true, bool disableCollider = false) { }
@@ -102,11 +96,9 @@ public partial class UIManager
public LoadingInScene CloseInSceneLoadingMatching() => default!; public LoadingInScene CloseInSceneLoadingMatching() => default!;
public void createInSceneNotNetwork() { } public void createInSceneNotNetwork() { }
public void closeInSceneNotNetwork() { } public void closeInSceneNotNetwork() { }
public void CreatFadeOpen(Action onFinishCallback = null) { }
public void CreatFadeClose(Action onFinishCallback = null) { } public void CreatFadeClose(Action onFinishCallback = null) { }
public bool isFading() => default!; public bool isFading() => default!;
public void CardLoadSelect(GameObject returnObj, IList<int> CardNums, int layer, bool is2D, Action onFinish = null, bool isDefaultSleeve = false, CardMaster.CardMasterId cardMasterId = CardMaster.CardMasterId.Default) { } public void CardLoadSelect(GameObject returnObj, IList<int> CardNums, int layer, bool is2D, Action onFinish = null, bool isDefaultSleeve = false, CardMaster.CardMasterId cardMasterId = CardMaster.CardMasterId.Default) { }
public void CardLoadGachaPack(GameObject returnObj, IList<int> CardNums, int layer, bool is2D, int sleeveId = 3000011) { }
public List<UIBase_CardManager.CardObjData> getCardList2DObjs() => default!; public List<UIBase_CardManager.CardObjData> getCardList2DObjs() => default!;
// Shim fix (M5): return a non-null, field-wired no-op so the copied cosmetic helpers it // Shim fix (M5): return a non-null, field-wired no-op so the copied cosmetic helpers it
// exposes (UIBase_CardManager.SetNumberLabelStyle/SetNameLabelStyle, read by // exposes (UIBase_CardManager.SetNumberLabelStyle/SetNameLabelStyle, read by
@@ -116,20 +108,15 @@ public partial class UIManager
public void setBackScene(GameObject obj, ViewScene backScene) { } public void setBackScene(GameObject obj, ViewScene backScene) { }
public TopBar CreateTopBar(GameObject obj, string titleMsg, ViewScene backScene = ViewScene.None, bool MoneyDraw = true, ChangeViewSceneParam Param = null, bool isWideMode = false) => default!; public TopBar CreateTopBar(GameObject obj, string titleMsg, ViewScene backScene = ViewScene.None, bool MoneyDraw = true, ChangeViewSceneParam Param = null, bool isWideMode = false) => default!;
public void RemoveNowSceneBackButtonParameter() { } public void RemoveNowSceneBackButtonParameter() { }
public void UpDateCrystalNum() { }
public void UpDateRupyNum() { }
public void ShowFooterMenu(bool isShow) { } public void ShowFooterMenu(bool isShow) { }
public static void SetObjectToGrey(GameObject o, bool b, Color? enableTextColor = null, Dictionary<Color32, AllLabelColorChanger.ColorSet> changeColorDict = null) { } public static void SetObjectToGrey(GameObject o, bool b, Color? enableTextColor = null, Dictionary<Color32, AllLabelColorChanger.ColorSet> changeColorDict = null) { }
public void CommonRetry() { } public void CommonRetry() { }
public FirstTips CheckFirstTips(FirstTips.TipsType TipsType, Action onFinish = null, int startPage = 0) => default!; public FirstTips CheckFirstTips(FirstTips.TipsType TipsType, Action onFinish = null, int startPage = 0) => default!;
public FirstTips StartFirstTips(FirstTips.TipsType TipsType, Action onFinish = null, int startPage = 0, int seasonId = 0) => default!;
public FirstTips StartFirstTips(IEnumerable<FirstTips.TipsType> tipsTypes, Action onFinish = null, int startPage = 0, int seasonId = 0) => default!; public FirstTips StartFirstTips(IEnumerable<FirstTips.TipsType> tipsTypes, Action onFinish = null, int startPage = 0, int seasonId = 0) => default!;
public bool IsActiveFirstTips() => default!;
public void SetLayerRecursive(Transform parentObj, int layer) { } public void SetLayerRecursive(Transform parentObj, int layer) { }
public void AttachAtlas(GameObject obj, bool isTargetChildren = true) { } public void AttachAtlas(GameObject obj, bool isTargetChildren = true) { }
public void AttachAtlas(List<GameObject> obj_list, bool isTargetChildren = true) { } public void AttachAtlas(List<GameObject> obj_list, bool isTargetChildren = true) { }
public bool IsQuitDialog() => default!; public bool IsQuitDialog() => default!;
public static void ShowDialogUrl(string title, string url, Action<DialogBase> onDialogOpening = null) { } public static void ShowDialogUrl(string title, string url, Action<DialogBase> onDialogOpening = null) { }
public void CreateAssetFileErrorDialog() { } public void CreateAssetFileErrorDialog() { }
public RewardBase GetRewardDialogPrefab() => default!;
} }

View File

@@ -75,7 +75,7 @@ namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { }
namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { } namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { }
namespace Wizard { } namespace Wizard { }
namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { } namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { }
namespace Wizard.UI.Common { public partial class TabList : MonoBehaviour { } } namespace Wizard.UI.Common { }
namespace Wizard.Battle.Tutorial { } namespace Wizard.Battle.Tutorial { }
namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { } namespace Wizard.Story.ChapterSelection.SelectionProcessing.Main { }
namespace Wizard.Battle.View { public partial class UnitBattleCardView : BattleCardView { } } namespace Wizard.Battle.View { public partial class UnitBattleCardView : BattleCardView { } }

View File

@@ -15,7 +15,6 @@ namespace Wizard.UIFriend
namespace Wizard.UI.Common namespace Wizard.UI.Common
{ {
public partial class Tab : UnityEngine.MonoBehaviour { }
} }
namespace Wizard.UI.Dialog.ImageSelection namespace Wizard.UI.Dialog.ImageSelection

View File

@@ -341,7 +341,6 @@ public void Play(int hash, int layer, float normalizedTime) { }
public Rect pixelRect { get; set; } public Rect pixelRect { get; set; }
public Color backgroundColor { get; set; } public Color backgroundColor { get; set; }
public CameraClearFlags clearFlags { get; set; } public CameraClearFlags clearFlags { get; set; }
public RenderTexture targetTexture { get; set; }
public Vector3 ViewportToWorldPoint(Vector3 p) => p; public Vector3 ViewportToWorldPoint(Vector3 p) => p;
public Vector3 WorldToViewportPoint(Vector3 p) => p; public Vector3 WorldToViewportPoint(Vector3 p) => p;
public Vector3 ScreenToWorldPoint(Vector3 p) => p; public Vector3 ScreenToWorldPoint(Vector3 p) => p;

View File

@@ -34,7 +34,7 @@ namespace UnityEngine
public partial class Light : Behaviour { } public partial class Light : Behaviour { }
public class AudioListener : Behaviour { } public class AudioListener : Behaviour { }
public enum RenderTextureFormat { ARGB32, Default } public enum RenderTextureFormat { Default }
public enum RuntimeInitializeLoadType public enum RuntimeInitializeLoadType
{ {

View File

@@ -118,7 +118,6 @@ namespace Wizard.Story
namespace Wizard.UI.Common namespace Wizard.UI.Common
{ {
public partial class TabList : UnityEngine.MonoBehaviour { }
} }
namespace Wizard.UI.Dialog.ImageSelection namespace Wizard.UI.Dialog.ImageSelection