int GetTextureIDFromPart(Vector2DInt inFurniturePart) { if (!inFurniturePart.IsWithinZeroAnd(_size)) { Debug.LogError("Tried getting part of furniture that is outside of the furniture"); return(0); } return(1); // TODO: Change this for a lookup against a static collection of exmple furniture or smth }
public int GetTextureIDFromWorldPosition(Vector2DInt inWorldPosition) { Vector2DInt targetPartPosition = new Vector2DInt() { x = inWorldPosition.x - _position.x, y = inWorldPosition.y - _position.y }; if (!targetPartPosition.IsWithinZeroAnd(_size)) { Debug.LogError("Tried getting part of furniture that is outside of the furniture"); return(0); } return(GetTextureIDFromPart(targetPartPosition)); }