예제 #1
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;
 }
예제 #2
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;
 }