コード例 #1
0
 public void ShowElementBall(bool isShow)
 {
     if (isShow)
     {
         if (this.elementBall == null)
         {
             GameObject gameObject = AssetManager.AssetOfNoPool.LoadAssetNowNoAB(FileSystem.GetPathOfPrefab("BallPrefab"), typeof(Object)) as GameObject;
             if (gameObject != null)
             {
                 this.elementBall = Object.Instantiate <GameObject>(gameObject);
                 this.elementBall.get_transform().set_parent(ModelPool.Instance.root.get_transform());
                 this.elementBall.get_transform().set_localPosition(Vector3.get_zero());
                 this.elementBall.get_transform().set_localRotation(Quaternion.get_identity());
             }
         }
         this.elementBall.get_transform().FindChild("ball").get_transform().set_rotation(Quaternion.Euler(0f, 0f, 0f));
         this.elementBall.SetActive(true);
         RTManager.Instance.CamProjRotateRevise = new Vector3(0.9f, 0.9f, 0.9f);
         RTManager.Instance.AimTargetOffsetY    = 0.18f;
         RTManager.Instance.AimTarget           = this.elementBall.get_transform().FindChild("ball").get_transform();
         CamerasMgr.SetRTCFieldOfView((float)DataReader <YWanFaSheZhi> .Get("cameraFieldOfView").num);
     }
     else
     {
         if (this.elementBall != null)
         {
             this.elementBall.SetActive(false);
         }
         CamerasMgr.SetRTCFieldOfView(0f);
     }
 }
コード例 #2
0
 public void ShowTerrestrialGlobe(bool isShow)
 {
     if (isShow)
     {
         if (this.goTerrestrialGlobe == null)
         {
             GameObject gameObject = AssetManager.AssetOfNoPool.LoadAssetNowNoAB("Envi/Model/qiumian/BallPrefab", typeof(Object)) as GameObject;
             this.goTerrestrialGlobe = Object.Instantiate <GameObject>(gameObject);
             this.goTerrestrialGlobe.get_transform().set_parent(ModelPool.Instance.root.get_transform());
             this.goTerrestrialGlobe.get_transform().set_localPosition(Vector3.get_zero());
             this.goTerrestrialGlobe.get_transform().set_localRotation(Quaternion.get_identity());
         }
         this.goTerrestrialGlobe.get_transform().FindChild("Ball").get_transform().set_rotation(Quaternion.Euler(300.1149f, 68.77782f, 0f));
         this.goTerrestrialGlobe.SetActive(true);
         this.TryToScrollBall();
         RTManager.Instance.CamProjRotateRevise = new Vector3(0.9f, 0.9f, 0.9f);
         RTManager.Instance.AimTargetOffsetY    = 0.18f;
         RTManager.Instance.AimTarget           = this.goTerrestrialGlobe.get_transform().FindChild("Ball").get_transform();
         CamerasMgr.SetRTCFieldOfView(30f);
     }
     else
     {
         if (this.goTerrestrialGlobe != null)
         {
             this.goTerrestrialGlobe.SetActive(false);
         }
         CamerasMgr.SetRTCFieldOfView(0f);
     }
 }