Esempio n. 1
0
 private void CameraTargetChanged(GameObject target)
 {
     if (_currentCamera != null && target != null) {
         if (CamType == CameraType.CHASE_CAM) {
             _currentCamera.TargetNode = target.transform.FindChild ("TPCameraNode");
         }
         if (CamType == CameraType.ORBITAL_CAM){// || CamType == CameraType.FPS_CAM) {
             _currentCamera.TargetNode = target.GetEstimatedHeadNode ();// GetEstimatedHeadNode(target);//target.transform.GetCenterNode();
         }
         if (CamType == CameraType.OVERHEAD_CAM) {
             _currentCamera.TargetNode = GetOverheadNode (target);
         }
         if (CamType == CameraType.OVERVIEW_CAM) {
             _currentCamera.TargetNode = target.transform.GetCenterNode ();
         }
         if (CamType == CameraType.FPS_CAM) {
             _currentCamera.TargetNode = target.GetHeadNode ();// GetEstimatedHeadNode(target);//target.transform.GetCenterNode();
         }
     }
 }