备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
using asap.core;
using GameCore;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class BarItemTips : MonoBehaviour
{
public RectTransform content;
public GameObject arrow;
public GameObject rewardEmptyGo1, rewardEmptyGo2;
public GameObject[] rewardGos;
public RewardItemNew[] rewards;
public TMP_Text textTarget, textOwned;
public Button btnClose;
public Image require_icon;
private void Start()
{
btnClose.onClick.AddListener(() => gameObject.SetActive(false));
}
public void Init(ItemData itemData, string icon, int targetScore, int score)
{
GContext.container.Resolve<IUIService>().SetImageSprite(require_icon, icon);
rewardEmptyGo1.SetActive(true);
rewardEmptyGo2.SetActive(true);
rewardGos[0].SetActive(true);
for (int i = 1; i < rewardGos.Length; i++)
{
rewardGos[i].SetActive(false);
}
rewards[0].SetData(itemData);
if (textOwned != null)
{
textOwned.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_1", score);
}
textTarget.text = LocalizationMgr.GetFormatTextValue("UI_EventRankPopupPanel_18", targetScore);
}
public void Init(List<ItemData> items, string icon, int targetScore, int score)
{
GContext.container.Resolve<IUIService>().SetImageSprite(require_icon, icon);
if (items.Count == 1)
{
rewardEmptyGo1.SetActive(true);
rewardEmptyGo2.SetActive(true);
rewardGos[0].SetActive(true);
for (int i = 1; i < rewardGos.Length; i++)
{
rewardGos[i].SetActive(false);
}
rewards[0].SetData(items[0]);
}
else if (items.Count > 1)
{
rewardEmptyGo1.SetActive(false);
rewardEmptyGo2.SetActive(false);
for (int i = 0; i < rewardGos.Length; i++)
{
rewardGos[i].SetActive(i < items.Count);
if (i < items.Count)
rewards[i].SetData(items[i]);
}
}
textOwned.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_1", score);
textTarget.text = LocalizationMgr.GetFormatTextValue("UI_EventRankPopupPanel_16", targetScore);
}
public void SetContent(Vector3 pos)
{
content.position = pos;
RectTransform rectTransform = transform.GetComponent<RectTransform>();
float limit = (rectTransform.rect.width - content.rect.width - 80) / 2;
//边界检测
var localPosition = content.transform.localPosition;
localPosition.x = 0;
if (localPosition.x > limit)
{
localPosition.x = limit;
}
else if (localPosition.x < -limit)
{
localPosition.x = -limit;
}
arrow.transform.position = new Vector3(pos.x, arrow.transform.position.y);
content.transform.localPosition = localPosition;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4603bb740c0c8e64da53a04456b59fcb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,91 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UniRx;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.UI;
public class BubbleTaskInfo : MonoBehaviour
{
Image require;
TMP_Text text_title;
GameObject BgTitle;
Image bgTitlePos;
string curBgTitle;
protected CompositeDisposable disposables = new CompositeDisposable();
private void Start()
{
var _fishingEventData = GContext.container.Resolve<FishingEventData>();
var collectingTarget = _fishingEventData.collectingTarget;
if (collectingTarget != null)
{
CollectingTargetInit init = _fishingEventData.collectingTargetInit;
SetInfo(init);
}
GContext.OnEvent<ChangeLanguageEvent>().Subscribe(OnChangeLanguage).AddTo(disposables);
}
void OnChangeLanguage(ChangeLanguageEvent changeLanguageEvent = null)
{
var _fishingEventData = GContext.container.Resolve<FishingEventData>();
var collectingTarget = _fishingEventData.collectingTarget;
if (collectingTarget != null)
{
text_title.text = LocalizationMgr.GetText(_fishingEventData.collectingTargetInit.Title_l10n_key);
}
}
public void SetInfo(CollectingTargetInit init)
{
require = transform.Find("btn_icon/icon").GetComponent<Image>();
bgTitlePos = transform.Find("bg").GetComponent<Image>();
text_title = transform.Find("text_title").GetComponent<TMP_Text>();
bgTitlePos.enabled = false;
var tables = GContext.container.Resolve<Tables>();
IUIService uIService = GContext.container.Resolve<IUIService>();
text_title.text = LocalizationMgr.GetText(init.Title_l10n_key);
var item = tables.TbItem[init.TokenID];
uIService.SetImageSprite(require, item.Icon);
ShowFxTitle(init.BgTitle);
}
async void ShowFxTitle(string bgTitle)
{
if (BgTitle != null && BgTitle.name != bgTitle)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
if (!string.IsNullOrEmpty(bgTitle) && BgTitle == null)
{
if (curBgTitle == bgTitle)
{
return;
}
curBgTitle = bgTitle;
BgTitle = await Addressables.InstantiateAsync(bgTitle, bgTitlePos.transform).Task;
if (BgTitle != null)
{
if (!enabled || curBgTitle != bgTitle)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
else
{
BgTitle.name = bgTitle;
}
}
}
}
private void OnDestroy()
{
if (BgTitle != null)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
disposables?.Dispose();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 914d827bf865660458173e9f450a08da
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,93 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UniRx;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.UI;
public class BubbleTaskInfo_2 : MonoBehaviour
{
Image require;
TMP_Text text_title;
TMP_Text text_title2;
GameObject BgTitle;
Image bgTitlePos;
string curBgTitle;
protected CompositeDisposable disposables = new CompositeDisposable();
private void Start()
{
var _fishingEventData = GContext.container.Resolve<FishingEventData>();
var collectingTarget = _fishingEventData.collectingTarget;
if (collectingTarget != null)
{
CollectingTargetInit init = _fishingEventData.collectingTargetInit;
SetInfo(init);
}
GContext.OnEvent<ChangeLanguageEvent>().Subscribe(OnChangeLanguage).AddTo(disposables);
}
void OnChangeLanguage(ChangeLanguageEvent changeLanguageEvent = null)
{
var _fishingEventData = GContext.container.Resolve<FishingEventData>();
var collectingTarget = _fishingEventData.collectingTarget;
if (collectingTarget != null)
{
text_title2.text = text_title.text = LocalizationMgr.GetText(_fishingEventData.collectingTargetInit.Title_l10n_key);
}
}
public void SetInfo(CollectingTargetInit init)
{
require = transform.Find("btn_icon/icon").GetComponent<Image>();
bgTitlePos = transform.Find("bg").GetComponent<Image>();
text_title = transform.Find("info_1/text_title").GetComponent<TMP_Text>();
text_title2 = transform.Find("info_2/text_title").GetComponent<TMP_Text>();
//bgTitlePos.enabled = false;
var tables = GContext.container.Resolve<Tables>();
IUIService uIService = GContext.container.Resolve<IUIService>();
text_title2.text = text_title.text = LocalizationMgr.GetText(init.Title_l10n_key);
var item = tables.TbItem[init.TokenID];
uIService.SetImageSprite(require, item.Icon);
ShowFxTitle(init.BgTitle);
}
async void ShowFxTitle(string bgTitle)
{
if (BgTitle != null && BgTitle.name != bgTitle)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
if (!string.IsNullOrEmpty(bgTitle) && BgTitle == null)
{
if (curBgTitle == bgTitle)
{
return;
}
curBgTitle = bgTitle;
BgTitle = await Addressables.InstantiateAsync(bgTitle, bgTitlePos.transform).Task;
if (BgTitle != null)
{
if (!enabled || curBgTitle != bgTitle)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
else
{
BgTitle.name = bgTitle;
}
}
}
}
private void OnDestroy()
{
if (BgTitle != null)
{
Addressables.ReleaseInstance(BgTitle);
BgTitle = null;
}
disposables?.Dispose();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: faad87cb3e18c374fb11f17cc3c0f300
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,240 @@
using System;
using System.Collections;
using System.Linq;
using System.Threading.Tasks;
using asap.core;
using DG.Tweening;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.UI;
public class EventChallengeLevelTips : MonoBehaviour
{
//
public int[] stepLeft;
// UI
private TMP_Text _textTitle;
private Image _bar;
private TMP_Text _textNum;
private Image _icon;
private Animation _rootAni;
//reward
private RewardItemNew _reward;
private RewardItemNew _scoreReward;
//
private FishingChallengeManager _fishingChallengeManager;
private TaskCompletionSource<bool> _tcs;
// 默认值
private float _speed = 1.0f;
private float _wait1 = 0.2f;
private float _wait2 = 0.5f;
private float _wait3 = 0.5f;
//
private Transform bg_left;
private Transform bg_right;
private Transform bg_lastround_left;
private Transform bg_lastround_right;
//
private Sound audio_ui_fishingduel_numincrease_sound;
private AudioClip audio_ui_fishingduel_numincrease;
// StopLoopAudio();
// audio_matchingloop = GContext.container.Resolve<ISoundService>().GetNewUISound(audio_ui_fishingduel_matchingloop);
// audio_matchingloop.audioSource.Play();
// audio_matchingloop.audioSource.loop = true;
private int _curStep;
// 最高积分,内部更新
private int _maxScore;
private void Awake()
{
_fishingChallengeManager = GContext.container.Resolve<FishingChallengeManager>();
_textTitle = transform.Find("tips/root/text_title").GetComponent<TMP_Text>();
_rootAni = transform.Find("tips/root").GetComponent<Animation>();
_bar = transform.Find("tips/root/bg_bar/bar").GetComponent<Image>();
_textNum = transform.Find("tips/root/bg_bar/text_num").GetComponent<TMP_Text>();
_reward = transform.Find("tips/root/reward").GetComponent<RewardItemNew>();
_scoreReward = transform.Find("tips/root/reward").GetComponent<RewardItemNew>();
_icon = transform.Find("tips/root/btn_icon/icon").GetComponent<Image>();
bg_left = transform.Find("tips/root/bg_left");
bg_right = transform.Find("tips/root/bg_right");
bg_lastround_left = transform.Find("tips/root/bg_lastround_left");
bg_lastround_right = transform.Find("tips/root/bg_lastround_right");
LoadAudio();
}
private void OnDestroy()
{
StopLoopAudio();
}
async void LoadAudio()
{
audio_ui_fishingduel_numincrease = await Addressables.LoadAssetAsync<AudioClip>("audio_ui_fishingduel_numincrease").Task;
}
public void SetCurStep(int curStep)
{
_curStep = curStep;
_maxScore = _fishingChallengeManager.GetMaxScoreByStep(curStep);
var checkValue = _curStep + 1;
var flag = checkValue == _fishingChallengeManager.GetFullStep();
//
if (stepLeft.Contains(checkValue))
{
bg_right.gameObject.SetActive(false);
bg_lastround_right.gameObject.SetActive(false);
bg_left.gameObject.SetActive(false);
bg_lastround_left.gameObject.SetActive(true);
}
else
{
bg_left.gameObject.SetActive(false);
bg_lastround_left.gameObject.SetActive(false);
bg_right.gameObject.SetActive(false);
bg_lastround_right.gameObject.SetActive(true);
}
}
public void Init(int oldScore)
{
var curStep = _fishingChallengeManager.GetStepByScore(oldScore,true);
var maxScore = _fishingChallengeManager.GetMaxScoreByStep(curStep);
// _textTitle.SetText($"level {curStep + 1}/{_fishingChallengeManager.GetFullStep()}");
_textTitle.text = LocalizationMgr.GetFormatTextValue("UI_EventChallengeCrocodilePanel_6", curStep + 1, _fishingChallengeManager.GetFullStep());
// _textNum.SetText($"{oldScore}/{maxScore}");
// _bar.fillAmount = (float)oldScore / maxScore;
var beginScore = _fishingChallengeManager.GetBeginScore(oldScore,true);
_textNum.SetText($"{oldScore - beginScore}/{maxScore - beginScore}");
_bar.fillAmount = _fishingChallengeManager.GetFillAmount(oldScore,true);
var itemData = _fishingChallengeManager.GetStageRewardByStep(curStep);
if (itemData != null)
{
_reward.SetData(itemData);
}
else
{
_reward.gameObject.SetActive(false);
}
SetCurStep(curStep);
}
public float GetSpeed()
{
return _speed;
}
public async Task<int> ShowTips(int oldScore, int newScore)
{
_tcs = new TaskCompletionSource<bool>();
Init(oldScore);
var finalScore = Math.Min(newScore, _maxScore);
await PlayVisibleAni();
// await PlayScoreIncrementAni();
await Awaiters.Seconds(_wait1 * GetSpeed());
StartCoroutine(PlayScorePre(oldScore,finalScore));
await _tcs.Task;
return finalScore;
}
void PlayLoopAudio()
{
StopLoopAudio();
audio_ui_fishingduel_numincrease_sound = GContext.container.Resolve<ISoundService>().GetNewUISound(audio_ui_fishingduel_numincrease);
audio_ui_fishingduel_numincrease_sound.audioSource.Play();
audio_ui_fishingduel_numincrease_sound.audioSource.loop = true;
}
void StopLoopAudio()
{
if (audio_ui_fishingduel_numincrease_sound)
{
audio_ui_fishingduel_numincrease_sound.audioSource.Stop();
audio_ui_fishingduel_numincrease_sound.ReturnPool();
audio_ui_fishingduel_numincrease_sound = null;
}
}
// public async Task ShowStageRewardAdded(int step)
// {
// await _reward?.transform.DOScale(1.5f, 0.7f)
// .SetEase(Ease.InOutSine) // 使用平滑的缓动函数
// .SetLoops(5, LoopType.Yoyo) // Yoyo模式会在正向和反向动画间切换
// .AsyncWaitForCompletion()!;
//
// }
private IEnumerator PlayScorePre(int startScore,int endScore)
{
Log("PlayScorePre");
// var duration = 0.5f;
var duration = _wait2 * GetSpeed();
// _bar.fillAmount = (float)startScore / _maxScore;
_bar.fillAmount = _fishingChallengeManager.GetFillAmount(startScore,true);
var endValue = _fishingChallengeManager.GetFillAmount(endScore,false);
// _bar.DOFillAmount((float)endScore / _maxScore, duration);
_bar.DOFillAmount(endValue, duration).OnStart(PlayLoopAudio).OnComplete(() =>
{
StopLoopAudio();
_rootAni.Play("bar_finished");
});
var curScore = startScore - _fishingChallengeManager.GetBeginScore(startScore,true);
endScore -= _fishingChallengeManager.GetBeginScore(startScore,true);
var maxValue= _maxScore - _fishingChallengeManager.GetBeginScore(startScore,true);
DOTween.To(() => curScore, x =>
{
curScore = x;
}, endScore,duration).OnUpdate(() =>
{
_textNum.text = $"{curScore}/{maxValue}";
});
yield return new WaitForSeconds(duration + _wait3 * GetSpeed());
// PlayInVisibleAni();
_tcs.SetResult(true);
}
public async Task PlayVisibleAni()
{
gameObject.SetActive(true);
}
private async Task PlayScoreIncrementAni()
{
var itemDataNew = new ItemData
{
id = _fishingChallengeManager.EventItemId,
count = 100,
};
var fly = Instantiate(_scoreReward, transform).GetComponent<RewardItemNew>();
fly.SetRewardPopupData(itemDataNew);
fly.gameObject.SetActive(true);
fly.transform.position = _scoreReward.transform.position ;
await fly.ParticleAttractor();
}
public async Task PlayInVisibleAni()
{
Log("PlayInVisibleAni()");
gameObject.SetActive(false);
}
private static void Log(object message)
{
Debug.Log($"<color=orange>EventChallengeLevelTips => {message} </color>");
}
public void SetSpeed(float speed)
{
_speed = speed;
}
public void UpdateControllerTime(float f, float f1, float f3)
{
_wait1 = f;
_wait2 = f1;
_wait3 = f3;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bb07630b925c406e88e8be1931939066
timeCreated: 1754395676

View File

@@ -0,0 +1,37 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class EventInfoPopupPanelTitle : MonoBehaviour
{
public int eventItemID;
public string infoTextKey = "UI_EventSandDigPanel_4";
public string tipsTextKey = "UI_EventSandDigPanel_7";
public Image icon;
public TMP_Text text_info;
public TMP_Text text_tips;
private void Reset()
{
text_info = transform.Find("root/info1/text_info").GetComponent<TMP_Text>();
text_tips = transform.Find("root/text_tips").GetComponent<TMP_Text>();
}
private void Start()
{
Tables tables = GContext.container.Resolve<Tables>();
Item item = tables.TbItem.GetOrDefault(eventItemID);
if (item == null)
{
#if UNITY_EDITOR
Debug.LogError($"见大你填错了{gameObject.name},没有这个代币 eventItemID {eventItemID}");
#endif
return;
}
GContext.container.Resolve<IUIService>().SetImageSprite(icon, item.Icon);
string itemName = LocalizationMgr.GetText(item.Name_l10n_key);
text_info.text = LocalizationMgr.GetFormatTextValue(infoTextKey, itemName);
text_tips.text = LocalizationMgr.GetFormatTextValue(tipsTextKey, itemName);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9a51f7d864d450749af8c5f76f8bf6f8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,99 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class buff_tips : MonoBehaviour
{
public TMP_Text buff_time;
public TMP_Text buff_name;
public TMP_Text buff_content;
public Image buff_icon;
public int buffId;
public void InitPanel(FishBuff buff)
{
buffId = buff.ID;
string title = LocalizationMgr.GetText(buff.Title_l10n_key);
string desc = LocalizationMgr.GetText(buff.Desc_l10n_key);
string iconName = buff.Icon;
if (buff.BuffParam is ExtraGold)
{
ExtraGold extraGold = buff.BuffParam as ExtraGold;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, extraGold.Param.ToPercentageString());
}
else if (buff.BuffParam is CollectionTargetExtraPoint)
{
string str = "";
//新目标奖励活动特殊地图 Todo
str = GContext.container.Resolve<FishingEventData>().collectingTargetInit.Title_l10n_key;
str = LocalizationMgr.GetText(str);
CollectionTargetExtraPoint collectionTargetExtraPoint = buff.BuffParam as CollectionTargetExtraPoint;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, collectionTargetExtraPoint.Param.ToPercentageString(), str);
}
else if (buff.BuffParam is SpMapExtraPoint)
{
SpMapExtraPoint spMapExtraPoint = buff.BuffParam as SpMapExtraPoint;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, spMapExtraPoint.Param.ToPercentageString());
}
else if (buff.BuffParam is CollectionTargetWeight)
{
string str = "";
//新目标奖励活动 Todo
CollectionTargetWeight collectionTargetWeight = buff.BuffParam as CollectionTargetWeight;
CollectingTargetInit collectingTargetInit = GContext.container.Resolve<FishingEventData>().collectingTargetInit;
if (collectingTargetInit != null)
{
EventTargetExtraDrop eventTargetExtraDrop = collectingTargetInit.FishingExtraDrop;
if (eventTargetExtraDrop is ETKeepsake)
{
ETKeepsake eTKeepsake = eventTargetExtraDrop as ETKeepsake;
int fishItemId = eTKeepsake.FishIDList[collectionTargetWeight.TargetFishIndex - 1];
Item item = GContext.container.Resolve<Tables>().TbItem.GetOrDefault(fishItemId);
str = LocalizationMgr.GetText(item.Name_l10n_key);
iconName = collectingTargetInit.BuffIcon;
}
}
title = LocalizationMgr.GetFormatTextValue(buff.Title_l10n_key, str);
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, str);
}
else if (buff.BuffParam is ConstructionCost)
{
ConstructionCost constructionCost = buff.BuffParam as ConstructionCost;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, constructionCost.Param.ToPercentageString());
}
else if (buff.BuffParam is SuperBomb)
{
SuperBomb superBomb = buff.BuffParam as SuperBomb;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, superBomb.CashBonus.ToPercentageString());
}
else if (buff.BuffParam is SuperRob)
{
SuperRob superRob = buff.BuffParam as SuperRob;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, superRob.CashBonus.ToPercentageString());
}
else if (buff.BuffParam is SuperHunt)
{
SuperHunt superHunt = buff.BuffParam as SuperHunt;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, superHunt.CashBonus.ToPercentageString());
}
else if (buff.BuffParam is SuperSavingPot)
{
SuperSavingPot superSavingPot = buff.BuffParam as SuperSavingPot;
desc = LocalizationMgr.GetFormatTextValue(buff.Desc_l10n_key, superSavingPot.Param.ToPercentageString());
}
buff_name.text = title;
buff_content.text = desc;
if (!string.IsNullOrEmpty(iconName))
{
GContext.container.Resolve<IUIService>().SetImageSprite(buff_icon, iconName);
}
}
public void SetBuffTime(string str)
{
buff_time.text = str;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fd6416943ffefc5459f0e929dbf99a1b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,82 @@
using GameCore;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
public class common_tips : MonoBehaviour
{
static common_tips _instance;
static bool isShowing = false;
public static async Task<common_tips> Show()
{
await Awaiters.NextFrame;
await ShowInit();
if (_instance == null)
{
return null;
}
_instance.transform.SetAsLastSibling();
return _instance;
}
private static async Task ShowInit()
{
if (!isShowing)
{
GameObject loading = await UIManager.Instance.GetUIAsync(UITypes.common_tips);
if (loading != null)
{
_instance = loading.GetComponent<common_tips>();
}
}
_instance.gameObject.SetActive(true);
}
Button btn_close;
reward_tips reward_tips;
info_tips info_tips;
tips_base tips_base;
public int clickInstanceID { get; set; }
private void Awake()
{
btn_close = transform.Find("btn_close").GetComponent<Button>();
reward_tips = transform.Find("reward_tips").GetComponent<reward_tips>();
info_tips = transform.Find("info_tips").GetComponent<info_tips>();
}
private void Start()
{
btn_close.onClick.AddListener(OnClickClose);
}
private void OnDestroy()
{
isShowing = false;
}
public void OnClickClose()
{
if (tips_base)
{
tips_base.gameObject.SetActive(false);
}
UIManager.Instance.HideUI(UITypes.common_tips);
}
public void ShowRewardTips(int clickInstanceID, Vector3 pos, List<int> itemIds, List<string> itemDics)
{
info_tips.gameObject.SetActive(false);
tips_base = reward_tips;
reward_tips.gameObject.SetActive(true);
reward_tips.SetData(itemIds, itemDics);
reward_tips.SetContent(pos);
this.clickInstanceID = clickInstanceID;
}
public void ShowInfo(int clickInstanceID, Vector3 pos, cfg.Item item)
{
reward_tips.gameObject.SetActive(false);
tips_base = info_tips;
info_tips.gameObject.SetActive(true);
info_tips.SetData(item);
info_tips.SetContent(pos);
this.clickInstanceID = clickInstanceID;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ea310ed35f64e38429a5e1a7ddb0141f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,40 @@
using cfg;
using GameCore;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class info_tips : tips_base
{
public TMP_Text text_info;
//public GameObject card_info;
//public TMP_Text text_num_card;
//public List<GameObject> star = new List<GameObject>();
protected override void Awake()
{
base.Awake();
text_info = bg.Find("text_info").GetComponent<TMP_Text>();
//card_info = transform.Find("card_info").gameObject;
//text_num_card = card_info.transform.Find("card_num/text_num").GetComponent<TMP_Text>();
//for (int i = 1; i < 6; i++)
//{
// star.Add(transform.Find("card_info/star/star" + i).gameObject);
//}
}
public void SetData(Item item)
{
width = 500;
//if (item.Type == 9 && item.SubType == 5)
//{
// string[] strs = item.Desc.Split('#');
// card_info.SetActive(true);
// text_num_card.text = strs[2];
// int starCount = int.Parse(strs[1]);
// for (int i = 0; i < star.Count; i++)
// {
// star[i].SetActive(i < starCount);
// }
//}
text_info.text = LocalizationMgr.GetText(item.Desc_l10n_key);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e9f2519e97f67c041b5784bb26b71ef1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,165 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class item_sanddig_tips : MonoBehaviour
{
public static async void Show(Vector3 pos, int dropID)
{
GameObject tips = await UIManager.Instance.ShowUI(UITypes.item_sanddig_tips);
if (tips != null)
{
item_sanddig_tips item_Sanddig_Tips = tips.GetComponent<item_sanddig_tips>();
item_Sanddig_Tips.SetData(pos, dropID);
}
}
public static async void Show(Vector3 pos, List<int> dropIDs)
{
GameObject tips = await UIManager.Instance.ShowUI(UITypes.item_sanddig_tips);
if (tips != null)
{
item_sanddig_tips item_Sanddig_Tips = tips.GetComponent<item_sanddig_tips>();
item_Sanddig_Tips.SetData(pos, dropIDs);
}
}
Button btn_close;
RectTransform content;
Transform arrow;
public RewardItemNew[] rewardItemNews;
public GameObject[] rewardItemGo;
int rewardCount = 4;
private void Awake()
{
btn_close = transform.Find("btn_close").GetComponent<Button>();
content = transform.Find("tips").GetComponent<RectTransform>();
arrow = transform.Find("tips/bg/arrow");
}
private void Start()
{
btn_close.onClick.AddListener(OnClickClose);
}
public void OnClickClose()
{
UIManager.Instance.DestroyUI(UITypes.item_sanddig_tips);
}
void SetItem(int dropID)
{
var itemDataList = GContext.container.Resolve<PlayerItemData>().GetItemDataByDropId(dropID);
rewardCount = itemDataList.Count;
for (int i = 0; i < rewardItemNews.Length; i++)
{
if (i < itemDataList.Count)
{
rewardItemNews[i].SetData(itemDataList[i]);
rewardItemGo[i].SetActive(true);
}
else
{
rewardItemGo[i].SetActive(false);
}
}
}
public void Show(List<int> dropList)
{
Tables tables = GContext.container.Resolve<Tables>();
PlayerItemData playerItemData = GContext.container.Resolve<PlayerItemData>();
Dictionary<int, string> dropDict = new Dictionary<int, string>();
Dictionary<int, List<int>> itemDict = new Dictionary<int, List<int>>();
for (int i = 0; i < dropList.Count; i++)
{
Drop drop = tables.TbDrop.GetOrDefault(dropList[i]);
List<int> countList = drop.DropList.DropCountList;
List<int> idList = drop.DropList.DropIDList;
if (countList.Count != idList.Count)
{
Debug.LogError($"掉落配置错误掉落ID:{dropList[i]}");
continue;
}
for (int j = 0; j < idList.Count; j++)
{
int id = idList[j];
int count = countList[j];
if (itemDict.ContainsKey(id))
{
itemDict[id].Add(count);
}
else
{
itemDict[id] = new List<int>() { count };
}
}
}
foreach (var kv in itemDict)
{
int id = kv.Key;
List<int> countList = kv.Value;
int min = countList[0];
int max = countList[0];
for (int j = 1; j < countList.Count; j++)
{
max += countList[j];
if (min > countList[j])
{
min = countList[j];
}
}
if (id == 1002)
{
min = playerItemData.GetExtraCoinMag(min);
max = playerItemData.GetExtraCoinMag(max);
//var num = ConvertTools.KeepThreeSignificantDigits(count);
//text = $"x{ConvertTools.GetNumberString(num)}";
}
string minStr = ConvertTools.GetNumberString(min);
string maxStr = ConvertTools.GetNumberString(max);
dropDict[id] = min == max ? minStr : $"{minStr}-{maxStr}";
}
int index = 0;
foreach (var kv in dropDict)
{
rewardItemNews[index].SetData(kv.Key, kv.Value);
index++;
}
for (int i = index; i < rewardItemNews.Length; i++)
{
rewardItemNews[i].gameObject.SetActive(false);
}
}
void SetPos(Vector3 pos)
{
content.position = pos;
RectTransform rectTransform = transform.GetComponent<RectTransform>();
float limit = (rectTransform.rect.width - 210 * rewardCount - 80) / 2;
//边界检测
var localPosition = content.transform.localPosition;
if (localPosition.x > limit)
{
localPosition.x = limit;
}
else if (localPosition.x < -limit)
{
localPosition.x = -limit;
}
content.transform.localPosition = localPosition;
arrow.position = new Vector3(pos.x, arrow.position.y);
}
public void SetData(Vector3 pos, int dropID)
{
content.gameObject.SetActive(true);
SetItem(dropID);
SetPos(pos);
}
public void SetData(Vector3 pos, List<int> dropIDs)
{
content.gameObject.SetActive(true);
Show(dropIDs);
SetPos(pos);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 806ae042591e5e942b00f2b41dfda48f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,126 @@
using GameCore;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
public class item_tips : MonoBehaviour
{
static item_tips _instance;
static bool isShowing = false;
public static async Task<item_tips> Show()
{
await ShowInit();
if (_instance == null)
{
return null;
}
_instance.transform.SetAsLastSibling();
return _instance;
}
private static async Task ShowInit()
{
if (!isShowing)
{
GameObject loading = await UIManager.Instance.GetUIAsync(UITypes.item_tips);
if (loading != null)
{
_instance = loading.GetComponent<item_tips>();
}
}
_instance.gameObject.SetActive(true);
}
Button btn_close;
RectTransform content;
public item_tips_fish_card item_fish_card;
public item_tips_box item_box;
public item_tips_box_2 item_box_2;
public item_tips_item item_tips_item;
public buff_tips buff_Tips;
public buff_tips buff_target;
public item_perk item_Perk;
//public int clickInstanceID { get; set; }
private void Awake()
{
btn_close = transform.Find("btn_close").GetComponent<Button>();
}
private void Start()
{
btn_close.onClick.AddListener(OnClickClose);
}
private void OnDestroy()
{
isShowing = false;
}
public void OnClickClose()
{
UIManager.Instance.HideUI(UITypes.item_tips);
}
public void Init(int clickInstanceID, Vector3 pos, cfg.Item item, double count)
{
buff_Tips.gameObject.SetActive(false);
buff_target.gameObject.SetActive(false);
item_fish_card.gameObject.SetActive(item.Type == 5);
item_box.gameObject.SetActive(item.Type == 9 && item.SubType == 2);
item_box_2.gameObject.SetActive(item.Type == 9 && (item.SubType == 1 || item.SubType == 3 || item.SubType == 7));
item_Perk.gameObject.SetActive(false);
item_tips_item.gameObject.SetActive(false);
if (item.Type == 5)
{
item_fish_card.Init(item);
content = item_fish_card.transform as RectTransform;
}
else if (item.Type == 9 && item.SubType == 2)
{
item_box.Show(item, count);
content = item_box.transform as RectTransform;
}
else if (item.Type == 9 && (item.SubType == 1 || item.SubType == 3 || item.SubType == 7))
{
item_box_2.Show(item, count);
content = item_box_2.transform as RectTransform;
}
else
{
item_tips_item.gameObject.SetActive(true);
item_tips_item.Init(item, count);
content = item_tips_item.transform as RectTransform;
}
SetContent(pos);
}
void SetContent(Vector3 pos)
{
content.position = pos;
RectTransform rectTransform = transform.GetComponent<RectTransform>();
//float limit = (rectTransform.rect.width - content.rect.width - 80) / 2;
//边界检测
var localPosition = content.transform.localPosition;
localPosition.x = 0;
float height = rectTransform.rect.height / 2;
if (localPosition.y < -height)
{
localPosition.y = -height;
}
else if (localPosition.y > height - 2 * content.rect.height)
{
localPosition.y = localPosition.y - content.rect.height;
}
content.transform.localPosition = localPosition;
}
public void ShowPerk(int rodID, int index, Vector3 pos, int addLevel = -1)
{
item_Perk.transform.position = pos;
item_Perk.transform.localPosition = new Vector3(0, item_Perk.transform.localPosition.y, 0);
item_fish_card.gameObject.SetActive(false);
item_box.gameObject.SetActive(false);
item_box_2.gameObject.SetActive(false);
item_tips_item.gameObject.SetActive(false);
buff_Tips.gameObject.SetActive(false);
buff_target.gameObject.SetActive(false);
item_Perk.gameObject.SetActive(true);
item_Perk.Show(rodID, index, addLevel);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a9d1d5cec808d4d4dbcb8b04694a9aae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class item_tips_box : MonoBehaviour
{
public RewardItemNew rewardItemNew;
public TMP_Text text_name;
public TMP_Text text_num;
public Image bg_name;
public RewardItemNew[] rewardItemNews;
public TMP_Text[] text_possibility;
public GameObject[] empty;
public void Show(Item item, double count)
{
rewardItemNew.SetData(item);
rewardItemNew.text_num.gameObject.SetActive(false);
text_name.text = LocalizationMgr.GetText(item.Name_l10n_key);
//GContext.container.Resolve<IUIService>().SetImageSprite(bg_name, $"bg_itemtips_title_{item.Quality}");
text_num.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_1", ConvertTools.GetNumberString((int)count));
ItemDropPackage itemDropPackage = GContext.container.Resolve<Tables>().TbItemDropPackage.GetOrDefault(item.RedirectID);
List<string> CountDisplay = GContext.container.Resolve<PlayerItemData>().ShowItemDropPackage(itemDropPackage);
for (int i = 0; i < rewardItemNews.Length; i++)
{
if (i < itemDropPackage.ItemDisplay.Count)
{
//宝箱内容展示
rewardItemNews[i].SetData(itemDropPackage.ItemDisplay[i], CountDisplay[i]/*, true*/);
empty[i].SetActive(false);
if (text_possibility.Length <= i)
{
continue;
}
if (itemDropPackage.ProbDisplay.Count > i)
{
text_possibility[i].text = itemDropPackage.ProbDisplay[i].ToPercentageString();
}
else
{
text_possibility[i].text = "";
}
}
else
{
rewardItemNews[i].gameObject.SetActive(false);
empty[i].SetActive(true);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 95e4e2adfe85ec04ea062a591d229189
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,41 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class item_tips_box_2 : MonoBehaviour
{
public RewardItemNew rewardItemNew;
public TMP_Text text_name;
public TMP_Text text_desc;
public Image bg_name;
public RewardItemNew[] rewardItemNews;
public GameObject[] empty;
public void Show(Item item, double count)
{
rewardItemNew.SetData(item);
rewardItemNew.text_num.gameObject.SetActive(false);
text_name.text = LocalizationMgr.GetText(item.Name_l10n_key);
text_desc.text = LocalizationMgr.GetText(item.Desc_l10n_key);
ItemDropPackage itemDropPackage = GContext.container.Resolve<Tables>().TbItemDropPackage.GetOrDefault(item.RedirectID);
List<string> CountDisplay = GContext.container.Resolve<PlayerItemData>().ShowItemDropPackage(itemDropPackage);
for (int i = 0; i < rewardItemNews.Length; i++)
{
if (i < itemDropPackage.ItemDisplay.Count)
{
empty[i].SetActive(false);
//宝箱内容展示
rewardItemNews[i].SetData(itemDropPackage.ItemDisplay[i], CountDisplay[i]/*, true*/);
}
else
{
rewardItemNews[i].gameObject.SetActive(false);
empty[i].SetActive(false);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a041fd4ad094f0a4ab752974ae8e072e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,73 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class item_tips_fish_card : MonoBehaviour
{
public RewardItemNew rewardItemNew;
public Image bg_name;
public TMP_Text text_name;
public TMP_Text text_num;
public GameObject[] cardGo;
public GameObject[] emptyGo;
public TMP_Text[] textCardNums;
public TMP_Text text_map;
private void Reset()
{
rewardItemNew = transform.Find("reward").GetComponent<RewardItemNew>();
bg_name = transform.Find("bg_name").GetComponent<Image>();
text_name = transform.Find("text_name").GetComponent<TMP_Text>();
text_num = transform.Find("info/text_num").GetComponent<TMP_Text>();
cardGo = new GameObject[5];
emptyGo = new GameObject[5];
textCardNums = new TMP_Text[5];
for (int i = 0; i < cardGo.Length; i++)
{
cardGo[i] = transform.Find($"card_info/card_{i + 1}").gameObject;
emptyGo[i] = transform.Find($"card_info/card_{i + 1}/empty").gameObject;
textCardNums[i] = transform.Find($"card_info/card_{i + 1}/bg/text_num").GetComponent<TMP_Text>();
}
}
public void Init(Item item)
{
rewardItemNew.SetData(item);
rewardItemNew.text_num.gameObject.SetActive(false);
//var titleIndex = item.Quality > 6 ? 6 : item.Quality;
//GContext.container.Resolve<IUIService>().SetImageSprite(bg_name, $"bg_itemtips_title_{titleIndex}");
List<int> allCount = new List<int>() { 0, 0, 0, 0, 0 };
text_map.gameObject.SetActive(item.SubType == 1);
if (item.SubType == 1)
{
var fishCard = GContext.container.Resolve<Tables>().TbFishCardDrop.GetOrDefault(item.RedirectID);
allCount = fishCard.CountByQuality;
MapData mapData = GContext.container.Resolve<Tables>().TbMapData.GetOrDefault(fishCard.MapID);
text_map.text = LocalizationMgr.GetText(mapData.Name_l10n_key);
}
else if (item.SubType == 2)
{
var fishCard = GContext.container.Resolve<Tables>().TbGeneralCardWeight.GetOrDefault(item.RedirectID);
allCount = fishCard.CountByQuality;
}
text_name.text = LocalizationMgr.GetText(item.Name_l10n_key);
text_num.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_2", allCount.Sum());
for (int i = 0; i < cardGo.Length; i++)
{
if (allCount[i] > 0)
{
textCardNums[i].text = $"x{allCount[i]}";
}
else
{
textCardNums[i].text = "";
}
emptyGo[i].SetActive(allCount[i] <= 0);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 544d47c032ec0e24b8ce5c27b6d968f1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class item_tips_item : MonoBehaviour
{
public RewardItemNew rewardItemNew;
public TMP_Text text_name;
public TMP_Text text_num;
public TMP_Text text_content;
public Image bg_name;
public void Init(Item item, double count)
{
rewardItemNew.SetData(item);
rewardItemNew.text_num.gameObject.SetActive(false);
text_name.text = LocalizationMgr.GetText(item.Name_l10n_key);
text_content.text = LocalizationMgr.GetText(item.Desc_l10n_key);
//GContext.container.Resolve<IUIService>().SetImageSprite(bg_name, $"bg_itemtips_title_{item.Quality}");
if (item.Type == 2 && (item.SubType == 4 || item.SubType == 6))
{
text_num.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_1", $"{count}%");
}
else
{
text_num.text = LocalizationMgr.GetFormatTextValue("UI_item_tips_1", ConvertTools.GetNumberString((ulong)count));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 39d4905d5aa37a1469e28ab50474438a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using UnityEngine;
public class reward_tips : tips_base
{
tips_reward_item[] rewardItems;
protected override void Awake()
{
base.Awake();
rewardItems = bg.gameObject.GetComponentsInChildren<tips_reward_item>();
}
public void SetData(List<int> itemIds, List<string> itemDics)
{
width = rewardItems[0].GetComponent<RectTransform>().rect.width * (itemIds.Count / 2 + 1);
int count = itemIds.Count;
for (int i = 0; i < rewardItems.Length; i++)
{
if (i < count)
{
rewardItems[i].SetData(itemIds[i], itemDics[i]);
}
else
{
rewardItems[i].gameObject.SetActive(false);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5350f98bfcca36c4181640336f412ccb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using UnityEngine;
public class tips_base : MonoBehaviour
{
public RectTransform content;
public RectTransform bg;
public RectTransform arrow;
protected float width;
#if UNITY_EDITOR
private void Reset()
{
Awake();
}
#endif
protected virtual void Awake()
{
content = GetComponent<RectTransform>();
bg = content.Find("bg").GetComponent<RectTransform>();
arrow = bg.Find("arrow").GetComponent<RectTransform>();
}
public void SetContent(Vector3 pos)
{
bg.transform.position = pos;
float limit = content.rect.width / 2 - width;
//边界检测
if (bg.transform.localPosition.x > limit)
{
bg.transform.localPosition = new Vector3(limit, bg.transform.localPosition.y);
}
else if (bg.transform.localPosition.x < -limit)
{
bg.transform.localPosition = new Vector3(-limit, bg.transform.localPosition.y);
}
arrow.transform.position = new Vector3(pos.x, arrow.transform.position.y);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d786f9b8c4505604d9fcf34cbbe7bf56
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class tips_reward_item : MonoBehaviour
{
public Image icon;
public TMP_Text text_num;
public TMP_Text text_num_yellow;
public GameObject card_info;
public TMP_Text text_num_card;
public List<GameObject> star = new List<GameObject>();
private void Awake()
{
icon = transform.Find("icon").GetComponent<Image>();
text_num = transform.Find("text_num").GetComponent<TMP_Text>();
card_info = transform.Find("card_info").gameObject;
text_num_card = card_info.transform.Find("card_num/text_num").GetComponent<TMP_Text>();
text_num_yellow = transform.Find("text_num_yellow").GetComponent<TMP_Text>();
for (int i = 1; i < 6; i++)
{
star.Add(transform.Find("card_info/star/star" + i).gameObject);
}
}
public void SetData(int itemId, string text = null)
{
Item item = GContext.container.Resolve<Tables>().GetItemData(itemId);
text_num_yellow.gameObject.SetActive(false);
card_info.SetActive(false);
text_num.gameObject.SetActive(false);
if (item.Type == 1 && (item.SubType == 1 || item.SubType == 2))
{
text_num_yellow.gameObject.SetActive(true);
text_num_yellow.text = text;
}
else if (item.Type == 9 && item.SubType == 5)
{
string[] strs = item.Desc.Split('#');
card_info.SetActive(true);
text_num_card.text = strs[2];
int starCount = int.Parse(strs[1]);
for (int i = 0; i < star.Count; i++)
{
star[i].SetActive(i < starCount);
}
}
else
{
text_num.gameObject.SetActive(true);
text_num.text = text;
}
GContext.container.Resolve<IUIService>().SetImageSprite(icon, item.Icon, BasePanel.PanelName);
gameObject.SetActive(true);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be53ba60d634d5c4c87bdc15f253ee3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: