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);
                }
            }
        }
示例#2
0
 protected override void OnStartRunning()
 {
     _converter = GameStateHelper.CreateWorldPositionConverter(Entities);
 }