| | 1 | | using DCL; |
| | 2 | | using DCL.Components; |
| | 3 | | using DCL.Controllers; |
| | 4 | | using DCL.Helpers; |
| | 5 | | using DCL.Models; |
| | 6 | | using System.Collections; |
| | 7 | | using System.Collections.Generic; |
| | 8 | | using UnityEngine; |
| | 9 | |
|
| | 10 | | /// <summary> |
| | 11 | | /// This component describes the visibility of the Entity in the builder in world. |
| | 12 | | /// Builder in World send a message to kernel to change the value of this component in order to show/hide it |
| | 13 | | /// </summary> |
| | 14 | | public class DCLVisibleOnEdit : BaseDisposable |
| | 15 | | { |
| | 16 | | [System.Serializable] |
| | 17 | | public class Model : BaseModel |
| | 18 | | { |
| | 19 | | public bool isVisible; |
| | 20 | |
|
| 0 | 21 | | public override BaseModel GetDataFromJSON(string json) { return Utils.SafeFromJson<Model>(json); } |
| | 22 | | } |
| | 23 | |
|
| 0 | 24 | | public DCLVisibleOnEdit() { model = new Model(); } |
| | 25 | |
|
| 0 | 26 | | public override int GetClassId() { return (int) CLASS_ID.VISIBLE_ON_EDIT; } |
| | 27 | |
|
| | 28 | | public override IEnumerator ApplyChanges(BaseModel newModel) |
| | 29 | | { |
| 0 | 30 | | RaiseOnAppliedChanges(); |
| 0 | 31 | | return null; |
| | 32 | | } |
| | 33 | | } |