Esempio n. 1
0
    private void Start()
    {
        _data = LevelLoader.Data;

        _factory      = new ObjectsFactory();
        _platformSize = _factory.PlatformSize();

        _camera    = GameObject.FindWithTag("MainCamera").GetComponent <Camera>();
        _lvlWidth  = _camera.orthographicSize * 2.0f * _camera.aspect;
        _lvlHeight = _camera.orthographicSize * 2.0f;

        _camera.transform.position = new Vector3(_lvlWidth / 2, _lvlHeight / 2, _camera.transform.position.z);

        Generate();
    }