示例#1
0
 /// <summary>
 /// Initialize targetCameraArea reference to main camera if null or blockMainCamera is true.
 /// Note: Must happen after CameraExtension calls Initialize (which sets MainCamera values)
 /// </summary>
 /// <access>public override void</access>
 /// <seealso cref="CameraExtension.Initialize" />
 public override void Initialize()
 {
     if (targetCameraArea == null || blockMainCamera)
     {
         targetCameraArea = MainCamera.Area;
     }
 }
示例#2
0
        /// <summary>Get CameraFocus and CameraArea components</summary>
        /// <access>public override void</access>
        public override void Initialize()
        {
            extension = GetComponent <CameraExtension>();
            focus     = GetComponent <CameraFocus>();
            area      = GetComponent <CameraArea>();
            shake     = GetComponent <CameraShake>();

            if (focus != null)
            {
                extension.Pan      = focus.BaseFocalPoint.transform.position;
                targetMovePosition = extension.Pan;
            }
        }