Esempio n. 1
0
        static void AttachTopDownScript(GameObject _camera, Transform _target)
        {
            //Assign top down camera script to camera
            TopDownCamera cameraScript = null;

            if (_camera)
            {
                cameraScript = _camera.AddComponent <TopDownCamera>();

                if (_camera && _target)
                {
                    cameraScript.target = _target;
                }

                Selection.activeGameObject = _camera;
            }
        }
Esempio n. 2
0
 void OnEnable()
 {
     targetCam = (TopDownCamera)target;
 }