public FieldRectSize GetFieldSize() { var rect = rectTransform.rect; if ((int)fieldRectSize.Width == 0) { fieldRectSize = new FieldRectSize(rect); } return(fieldRectSize); }
public static float CalculateCellSize(FieldRectSize rectSize, FieldSettings fieldSettings) { return(Math.Min(rectSize.Width / fieldSettings.width, rectSize.Height / fieldSettings.height)); }