Exemplo n.º 1
0
        /// <summary>
        /// Установить текущую позицию поля и игрока
        /// </summary>
        private void SetPosition()
        {
            var playerPos = SettingsAccess.ConvertToWorldPosition(_currentCellItemPosition, _zoom.GetZoomPrecision());

            if (_zoom.IsCellsView())
            {
                _tr.position = SettingsAccess.ConvertToWorldPosition(_currentCellPosition + Vector2Int.one * SettingsAccess.HalfCellPxSize, _zoom.GetZoomPrecision());
            }
            else
            {
                _tr.position = playerPos;
            }

            _player.SetPosition(playerPos);
        }