| | 1 | | using DCL; |
| | 2 | | using System; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | [Obsolete("This bridge will be replaced by WebInterfaceMinimapApiBridge in the future")] |
| | 6 | | public class MinimapMetadataController : MonoBehaviour |
| | 7 | | { |
| 0 | 8 | | private MinimapMetadata minimapMetadata => MinimapMetadata.GetMetadata(); |
| 1 | 9 | | public static MinimapMetadataController i { get; private set; } |
| | 10 | | public Action<Vector2Int> OnHomeChanged; |
| 0 | 11 | | private BaseVariable<Vector2Int> homePoint => DataStore.i.HUDs.homePoint; |
| | 12 | |
|
| | 13 | | public void Awake() |
| | 14 | | { |
| 0 | 15 | | i = this; |
| 0 | 16 | | minimapMetadata.Clear(); |
| 0 | 17 | | } |
| | 18 | |
|
| | 19 | | public void UpdateHomeScene(string sceneCoordinates) |
| | 20 | | { |
| 0 | 21 | | if (sceneCoordinates == null) |
| 0 | 22 | | return; |
| | 23 | |
|
| 0 | 24 | | homePoint.Set(new Vector2Int(Int32.Parse(sceneCoordinates.Split(',')[0]), Int32.Parse(sceneCoordinates.Split(',' |
| 0 | 25 | | OnHomeChanged?.Invoke(homePoint.Get()); |
| 0 | 26 | | } |
| | 27 | | } |