public TwoDimGridData(Vector2 _worldPosition, Tilemap _tilemap) { m_wordlPosition = _worldPosition; m_cellPosition = (Vector2Int)_tilemap.WorldToCell(_worldPosition); m_ID = GridTools.ConvertTo2DID(m_cellPosition, _tilemap.size.x); m_tilemap = _tilemap; }
public TwoDimGridData(Vector2Int _cellPosition, Tilemap _tilemap) { m_cellPosition = _cellPosition; m_wordlPosition = _tilemap.CellToWorld((Vector3Int)_cellPosition); m_ID = GridTools.ConvertTo2DID(_cellPosition, _tilemap.size.x); m_tilemap = _tilemap; }