| | 1 | | using DCL.Helpers; |
| | 2 | | using System; |
| | 3 | | using System.Linq; |
| | 4 | | using UnityEngine; |
| | 5 | | using MainScripts.DCL.Controllers.HotScenes; |
| | 6 | |
|
| | 7 | | public class MapInfoHandler : IMapDataView |
| | 8 | | { |
| 51 | 9 | | public Vector2Int baseCoord { private set; get; } |
| 51 | 10 | | public string name { private set; get; } |
| 51 | 11 | | public string creator { private set; get; } |
| 51 | 12 | | public string description { private set; get; } |
| | 13 | |
|
| 51 | 14 | | public Vector2Int[] parcels { private set; get; } |
| | 15 | |
|
| | 16 | | public void SetMinimapSceneInfo(IHotScenesController.PlaceInfo sceneInfo) |
| | 17 | | { |
| 51 | 18 | | baseCoord = Utils.ConvertStringToVector(sceneInfo.base_position); |
| 51 | 19 | | name = sceneInfo.title; |
| 51 | 20 | | creator = sceneInfo.owner; |
| 51 | 21 | | description = sceneInfo.description; |
| 51 | 22 | | parcels = sceneInfo.Positions; |
| 51 | 23 | | } |
| | 24 | |
|
| | 25 | | public bool ContainCoords(Vector2Int coords) |
| | 26 | | { |
| 0 | 27 | | if (parcels == null) |
| 0 | 28 | | return false; |
| 0 | 29 | | return parcels.Contains(coords); |
| | 30 | | } |
| | 31 | | } |