| | 1 | | using DCL.Components; |
| | 2 | | using DCL.Configuration; |
| | 3 | | using DCL.Helpers.NFT; |
| | 4 | | using System.Collections; |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using UnityEngine; |
| | 7 | |
|
| | 8 | | public class CatalogItem |
| | 9 | | { |
| | 10 | | public enum ItemType |
| | 11 | | { |
| | 12 | | SCENE_OBJECT = 0, |
| | 13 | | NFT = 1, |
| | 14 | | SMART_ITEM = 2 |
| | 15 | | } |
| | 16 | |
|
| | 17 | | public string id; |
| | 18 | | public ItemType itemType; |
| | 19 | |
|
| | 20 | | public string name; |
| | 21 | | public string model; |
| | 22 | | public string assetPackName; |
| | 23 | |
|
| | 24 | | public List<string> tags; |
| | 25 | | public string category; |
| | 26 | | public string categoryName; |
| | 27 | | public Dictionary<string, string> contents; |
| | 28 | |
|
| | 29 | | public SceneObject.ObjectMetrics metrics; |
| | 30 | | public SmartItemParameter[] parameters; |
| | 31 | | public SmartItemAction[] actions; |
| | 32 | | public bool isVoxel = false; |
| | 33 | | public string thumbnailURL; |
| | 34 | |
|
| | 35 | | private bool isFavorite = false; |
| | 36 | |
|
| 0 | 37 | | public string GetThumbnailUrl() => thumbnailURL; |
| | 38 | |
|
| 0 | 39 | | public void SetFavorite(bool isFavorite) => this.isFavorite = isFavorite; |
| | 40 | |
|
| 0 | 41 | | public bool IsFavorite() => isFavorite; |
| | 42 | |
|
| 0 | 43 | | public bool IsNFT() => itemType == ItemType.NFT; |
| | 44 | |
|
| 0 | 45 | | public bool IsSmartItem() => itemType == ItemType.SMART_ITEM; |
| | 46 | |
|
| 0 | 47 | | public bool IsVoxel() => isVoxel; |
| | 48 | |
|
| | 49 | | public bool HasActions() |
| | 50 | | { |
| 0 | 51 | | if (actions.Length > 0) |
| 0 | 52 | | return true; |
| | 53 | |
|
| 0 | 54 | | return false; |
| | 55 | | } |
| | 56 | | } |