cull(engine-cleanup): pass-8 phase-2 cascade round 4 after AreaSelectUI stub
This commit is contained in:
@@ -74,13 +74,4 @@ public class AreaSelInfo : MonoBehaviour
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetPresentItemSpriteName(int itemID)
|
||||
{
|
||||
if (itemID < 0 || itemID >= CLEARPRESENT_THUMBNAIL_SPRITENAME.Length)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return CLEARPRESENT_THUMBNAIL_SPRITENAME[itemID];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
internal class AreaSelectClearReward : MonoBehaviour
|
||||
{
|
||||
private class TextureTransformParam
|
||||
{
|
||||
public int Width { get; private set; }
|
||||
|
||||
public int Height { get; private set; }
|
||||
|
||||
public Vector3 Position { get; private set; }
|
||||
|
||||
public Quaternion Rotation { get; private set; }
|
||||
|
||||
public TextureTransformParam(int width, int height, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
Width = width;
|
||||
Height = height;
|
||||
Position = position;
|
||||
Rotation = rotation;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Dictionary<UserGoods.Type, TextureTransformParam> USERGOODS_TEXTURE_LAYOUT_DICT = new Dictionary<UserGoods.Type, TextureTransformParam>
|
||||
{
|
||||
{
|
||||
UserGoods.Type.Item,
|
||||
new TextureTransformParam(80, 80, Vector3.zero, Quaternion.identity)
|
||||
},
|
||||
{
|
||||
UserGoods.Type.Sleeve,
|
||||
new TextureTransformParam(80, 108, new Vector3(12f, 12f, 0f), Quaternion.Euler(0f, 0f, -15f))
|
||||
},
|
||||
{
|
||||
UserGoods.Type.Emblem,
|
||||
new TextureTransformParam(80, 80, Vector3.zero, Quaternion.identity)
|
||||
},
|
||||
{
|
||||
UserGoods.Type.Degree,
|
||||
new TextureTransformParam(169, 43, new Vector3(44f, -10f, 0f), Quaternion.identity)
|
||||
},
|
||||
{
|
||||
UserGoods.Type.Skin,
|
||||
new TextureTransformParam(100, 80, Vector3.zero, Quaternion.identity)
|
||||
}
|
||||
};
|
||||
|
||||
private readonly Quaternion CARDOBJECT_ROTATION_QUATERNION = new Quaternion(0f, 0f, 0f, 0f);
|
||||
|
||||
private readonly Color32 ACQUIRED_GRAY_COLOR = new Color32(144, 144, 144, byte.MaxValue);
|
||||
|
||||
private readonly Vector3 DEFAULT_NUM_POSITION = new Vector3(48f, -25f, 0f);
|
||||
|
||||
private readonly Vector3 CARD_NUM_POSITION = new Vector3(66f, -25f, 0f);
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _objLayoutCard;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _objAttachCard;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _spriteCardAcquiredMask;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _objLayoutSprite;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _spriteGoods;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _objLayoutTexture;
|
||||
|
||||
[SerializeField]
|
||||
private UITexture _textureGoods;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelNum;
|
||||
|
||||
private List<UIBase_CardManager.CardObjData> _cardObjList;
|
||||
|
||||
private GameObject _cardObjEvacuationRoot;
|
||||
|
||||
private GameObject _displayedCardObj;
|
||||
|
||||
public UserGoods.Type RewardGoodsType { get; private set; }
|
||||
|
||||
private void HideAllLayout()
|
||||
{
|
||||
_objLayoutCard.SetActive(value: false);
|
||||
_objLayoutSprite.SetActive(value: false);
|
||||
_objLayoutTexture.SetActive(value: false);
|
||||
}
|
||||
|
||||
private UIBase_CardManager.CardObjData GetCardObjData(int cardId)
|
||||
{
|
||||
for (int i = 0; i < _cardObjList.Count; i++)
|
||||
{
|
||||
UIBase_CardManager.CardObjData cardObjData = _cardObjList[i];
|
||||
if (cardObjData != null && cardObjData.ids == cardId)
|
||||
{
|
||||
return cardObjData;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void InitializeGoodsTexture(UITexture texture, UserGoods.Type goodsType, long goodsId)
|
||||
{
|
||||
string text = string.Empty;
|
||||
switch (goodsType)
|
||||
{
|
||||
default:
|
||||
return;
|
||||
case UserGoods.Type.Sleeve:
|
||||
{
|
||||
long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(goodsId);
|
||||
text = Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture, isfetch: true);
|
||||
break;
|
||||
}
|
||||
case UserGoods.Type.Emblem:
|
||||
text = Toolbox.ResourcesManager.GetAssetTypePath(goodsId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true);
|
||||
break;
|
||||
case UserGoods.Type.Degree:
|
||||
DegreeHelper.InitializeDegree(texture, goodsId, DegreeHelper.DegreeType.SMALL);
|
||||
break;
|
||||
case UserGoods.Type.Skin:
|
||||
text = Toolbox.ResourcesManager.GetAssetTypePath(goodsId.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail, isfetch: true);
|
||||
break;
|
||||
case UserGoods.Type.Item:
|
||||
{
|
||||
Item item = Data.Master.ItemList.Find((Item data) => data.UserGoodsId == goodsId);
|
||||
if (item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
text = Toolbox.ResourcesManager.GetAssetTypePath(item.thumbnail, ResourcesManager.AssetLoadPathType.Item, isfetch: true);
|
||||
break;
|
||||
}
|
||||
case UserGoods.Type.Card:
|
||||
case UserGoods.Type.Rupy:
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
texture.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(text);
|
||||
_textureGoods.material = null;
|
||||
_textureGoods.gameObject.SetActive(value: true);
|
||||
if (goodsType == UserGoods.Type.Sleeve)
|
||||
{
|
||||
long existingSleeveId2 = Toolbox.ResourcesManager.GetExistingSleeveId(goodsId);
|
||||
Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId2);
|
||||
if (sleeve.IsPremiumSleeve)
|
||||
{
|
||||
UIManager.GetInstance().getUIBase_CardManager().SetSleeveTexture(_textureGoods, sleeve.sleeve_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Color32 GetAcquiredColor(bool isAcquired)
|
||||
{
|
||||
if (isAcquired)
|
||||
{
|
||||
return ACQUIRED_GRAY_COLOR;
|
||||
}
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class DegreeHelper
|
||||
{
|
||||
public enum DegreeType
|
||||
{
|
||||
SMALL }
|
||||
|
||||
private static ResourcesManager.AssetLoadPathType GetResourceType(DegreeType type)
|
||||
{
|
||||
if (type == DegreeType.SMALL)
|
||||
{
|
||||
return ResourcesManager.AssetLoadPathType.Degree_S;
|
||||
}
|
||||
return ResourcesManager.AssetLoadPathType.Degree_M;
|
||||
}
|
||||
|
||||
private static ResourcesManager.AssetLoadPathType GetMaterialType(DegreeType type)
|
||||
{
|
||||
if (type == DegreeType.SMALL)
|
||||
{
|
||||
return ResourcesManager.AssetLoadPathType.DegreeMaterial_S;
|
||||
}
|
||||
return ResourcesManager.AssetLoadPathType.DegreeMaterial_M;
|
||||
}
|
||||
|
||||
private static string GetDegreePath(long id, DegreeType type, bool isFetch)
|
||||
{
|
||||
return Toolbox.ResourcesManager.GetAssetTypePath(id.ToString("0000"), GetResourceType(type), isFetch);
|
||||
}
|
||||
|
||||
private static string GetDegreeMaterialPath(long id, DegreeType type, bool isFetch)
|
||||
{
|
||||
return Toolbox.ResourcesManager.GetAssetTypePath(id.ToString("0000"), GetMaterialType(type), isFetch);
|
||||
}
|
||||
|
||||
private static string GetMaskPath(long id, bool isFetch)
|
||||
{
|
||||
return Toolbox.ResourcesManager.GetAssetTypePath(id.ToString("0000"), ResourcesManager.AssetLoadPathType.DegreeMask, isFetch);
|
||||
}
|
||||
|
||||
public static void InitializeDegree(UITexture texture, long id, DegreeType type)
|
||||
{
|
||||
string degreePath = GetDegreePath(id, type, isFetch: true);
|
||||
texture.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(degreePath);
|
||||
if (Data.Master.DegreeMgr.Get((int)id).IsPremium)
|
||||
{
|
||||
string degreeMaterialPath = GetDegreeMaterialPath(id, type, isFetch: true);
|
||||
texture.material = Toolbox.ResourcesManager.LoadObject<Material>(degreeMaterialPath);
|
||||
Texture value = Toolbox.ResourcesManager.LoadObject<Texture>(GetMaskPath(id, isFetch: true));
|
||||
texture.material.SetTexture("_MaskTex", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture.material = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user