feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
This commit is contained in:
96
SVSim.BattleEngine/Engine/Wizard/CardSleeveRewardItem.cs
Normal file
96
SVSim.BattleEngine/Engine/Wizard/CardSleeveRewardItem.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class CardSleeveRewardItem : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UITexture _rewardTexture;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _rewardLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _alreadyGetLabel;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _cardObjectParent;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _cardMask;
|
||||
|
||||
public UITexture RewardTexture => _rewardTexture;
|
||||
|
||||
public ShopCommonRewardInfo Info { get; private set; }
|
||||
|
||||
public GameObject CardObjectParent => _cardObjectParent;
|
||||
|
||||
public void SetReward(ShopCommonRewardInfo rewardInfo)
|
||||
{
|
||||
Info = rewardInfo;
|
||||
if (RewardTexture != null)
|
||||
{
|
||||
if (rewardInfo.Type == 6)
|
||||
{
|
||||
Sleeve sleeve = Data.Master.SleeveMgr.Get(rewardInfo.UserGoodsId);
|
||||
UIManager.GetInstance().getUIBase_CardManager().SetSleeveTexture(RewardTexture, sleeve.sleeve_id);
|
||||
}
|
||||
else if (rewardInfo.Type == 7)
|
||||
{
|
||||
string rewardImagePath = ShopCommonUtility.GetRewardImagePath(rewardInfo, isFetch: true);
|
||||
RewardTexture.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(rewardImagePath);
|
||||
RewardTexture.material = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = rewardInfo.Type;
|
||||
_ = 5;
|
||||
}
|
||||
}
|
||||
if (_rewardLabel != null)
|
||||
{
|
||||
if (rewardInfo.Type == 5)
|
||||
{
|
||||
CardParameter cardParameterFromId = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId((int)rewardInfo.UserGoodsId);
|
||||
_rewardLabel.SetWrapText(cardParameterFromId.CardName);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rewardLabel.SetWrapText(ShopCommonUtility.GetRewardDetailName(rewardInfo));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetArleadyGetVisible(bool visible)
|
||||
{
|
||||
if (!(_alreadyGetLabel == null))
|
||||
{
|
||||
_alreadyGetLabel.gameObject.SetActive(visible);
|
||||
if (RewardTexture != null)
|
||||
{
|
||||
UIManager.SetObjectToGrey(RewardTexture.gameObject, visible);
|
||||
}
|
||||
if (_cardMask != null)
|
||||
{
|
||||
_cardMask.SetActive(visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeNameLabelPosition(Vector3 localPosition)
|
||||
{
|
||||
if (_rewardLabel != null)
|
||||
{
|
||||
_rewardLabel.transform.localPosition = localPosition;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeNameLabelWidth(int width)
|
||||
{
|
||||
if (_rewardLabel != null)
|
||||
{
|
||||
_rewardLabel.width = width;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user