Beispiel #1
0
 void Start()
 {
     mCamera.AddListener(this);
     mSlider.maxValue = mCamera.GetMaxZoom();
     mSlider.minValue = mCamera.GetMinZoom();
     mIncreaseButton.onClick.AddListener(IncreaseZoom);
     mDecreaseButton.onClick.AddListener(DecreaseZoom);
     ZoomValueChanged(mCamera.GetZoom());
 }
Beispiel #2
0
 void Awake()
 {
     mSpriteRenderer = GetComponentInChildren <SpriteRenderer>();
     Debug.Assert(mSpriteRenderer != null, "mSpriteRenderer != null");
     if (mSpriteRenderer.transform != null)
     {
         mSpriteStartScale = mSpriteRenderer.transform.localScale;
     }
     mCamera.AddListener(this);
 }
Beispiel #3
0
 void Awake()
 {
     mCamera = GetComponent <UnityEngine.Camera>();
     mPlanetCamera.AddListener(this);
 }