protected override void OnStartRunning() { _positionConverter = GameStateHelper.CreateWorldPositionConverter(Entities); _gameHelper = new GameStateHelper(EntityManager, Entities); for (int i = 0; i < _gameHelper.GetSize().Width; i++) { for (int j = 0; j < _gameHelper.GetSize().Height; j++) { Transform cellBack = GameObject.Instantiate(_cellBackPrefab).transform; Vector2 woorldPosition = _positionConverter.LogicToWorld(new Vector2(i, j)); cellBack.position = new Vector3(woorldPosition.x, woorldPosition.y); } } }
private Vector2 ToWorldPosition(Vector2 input) { return(_converter.LogicToWorld(input)); }