| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using DCL.Controllers; |
| | 4 | | using DCL.Helpers; |
| | 5 | | using DCL.Models; |
| | 6 | | using Newtonsoft.Json; |
| | 7 | |
|
| | 8 | | namespace DCL.Components |
| | 9 | | { |
| | 10 | | public class SmartItemComponent : BaseComponent |
| | 11 | | { |
| | 12 | | public class Model : BaseModel |
| | 13 | | { |
| | 14 | | public string assetId; |
| | 15 | | public string src; |
| 6 | 16 | | public Dictionary<object, object> values = new Dictionary<object, object>(); |
| | 17 | |
|
| 0 | 18 | | public override BaseModel GetDataFromJSON(string json) { return JsonConvert.DeserializeObject<Model>(json); |
| | 19 | | } |
| | 20 | |
|
| 6 | 21 | | private void Awake() { model = new Model(); } |
| | 22 | |
|
| 4 | 23 | | public override IEnumerator ApplyChanges(BaseModel newModel) { yield break; } |
| | 24 | |
|
| 0 | 25 | | public override int GetClassId() { return (int) CLASS_ID_COMPONENT.SMART_ITEM; } |
| | 26 | |
|
| 0 | 27 | | public Dictionary<object, object> GetValues() { return ((Model)model).values; } |
| | 28 | | } |
| | 29 | | } |