| | 1 | | using System.Collections.Generic; |
| | 2 | | using System.Linq; |
| | 3 | | using DCL.Builder; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | public class LandWithAccess |
| | 7 | | { |
| 0 | 8 | | public string id => rawData.id; |
| 0 | 9 | | public LandType type => rawData.type; |
| 0 | 10 | | public LandRole role => rawData.role; |
| 0 | 11 | | public int size { get; } |
| 0 | 12 | | public string name => rawData.name; |
| 0 | 13 | | public string owner => rawData.owner; |
| | 14 | |
|
| | 15 | | public List<Scene> scenes; |
| | 16 | | public Vector2Int[] parcels; |
| | 17 | | public Vector2Int baseCoords; |
| | 18 | | public Land rawData; |
| | 19 | |
|
| 9 | 20 | | public LandWithAccess(Land land) |
| | 21 | | { |
| 9 | 22 | | rawData = land; |
| 13 | 23 | | parcels = land.parcels.Select(parcel => new Vector2Int(parcel.x, parcel.y)).ToArray(); |
| 9 | 24 | | baseCoords = land.type == LandType.PARCEL ? new Vector2Int(land.x, land.y) : parcels[0]; |
| 9 | 25 | | size = land.type == LandType.PARCEL ? 1 : land.size; |
| 9 | 26 | | } |
| | 27 | | } |