Пример #1
0
        public FieldRectSize GetFieldSize()
        {
            var rect = rectTransform.rect;

            if ((int)fieldRectSize.Width == 0)
            {
                fieldRectSize = new FieldRectSize(rect);
            }
            return(fieldRectSize);
        }
Пример #2
0
 public static float CalculateCellSize(FieldRectSize rectSize, FieldSettings fieldSettings)
 {
     return(Math.Min(rectSize.Width / fieldSettings.width, rectSize.Height / fieldSettings.height));
 }