Example #1
0
 public ThreeDimGridData(Vector3 _worldPosition, Tilemap _tilemap)
 {
     m_wordlPosition = _worldPosition;
     m_cellPosition  = _tilemap.WorldToCell(_worldPosition);
     m_ID            = GridTools.ConvertTo3DID(m_cellPosition, _tilemap.size.x, _tilemap.size.y);
     m_tilemap       = _tilemap;
 }
Example #2
0
 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;
 }
Example #3
0
 public ThreeDimGridData(Vector3Int _cellPosition, Tilemap _tilemap)
 {
     m_cellPosition  = _cellPosition;
     m_wordlPosition = _tilemap.CellToWorld(_cellPosition);
     m_ID            = GridTools.ConvertTo3DID(_cellPosition, _tilemap.size.x, _tilemap.size.y);
     m_tilemap       = _tilemap;
 }
Example #4
0
 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;
 }