Exemple #1
0
    private void Awake()
    {
        _mainCamera = Camera.main;

        _screenLimits = FindObjectOfType <ScreenLimits>();
        _bounds       = GetComponent <SpriteRenderer>().bounds;
    }
Exemple #2
0
    private void Awake()
    {
        _screenLimits = FindObjectOfType <ScreenLimits>();

        transform.localScale = new Vector3(
            _fitX ? _screenLimits.ScreenSizeUnits.x : transform.localScale.x,
            _fitY ? _screenLimits.ScreenSizeUnits.y : transform.localScale.y,
            transform.localScale.z);
    }
Exemple #3
0
 private void Awake()
 {
     _instance = this;
 }