Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
    private void DoComic()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(5).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        Debug.LogError(string.Concat(new object[]
                        {
                            "DoComic anime=",
                            shiJianCanShuBiao.anime,
                            " anime2=",
                            shiJianCanShuBiao.anime2
                        }));
                        if (shiJianCanShuBiao.anime == -1)
                        {
                            CamerasMgr.OpenEye();
                        }
                        else if (shiJianCanShuBiao.anime <= 0)
                        {
                            if (shiJianCanShuBiao.anime2 != string.Empty)
                            {
                                this.isPause = true;
                                List <List <int> > list  = new List <List <int> >();
                                string[]           array = shiJianCanShuBiao.anime2.Split(new char[]
                                {
                                    ';'
                                });
                                for (int i = 0; i < array.Length; i++)
                                {
                                    List <int> list2  = new List <int>();
                                    string[]   array2 = array[i].Split(new char[]
                                    {
                                        ','
                                    });
                                    for (int j = 0; j < array2.Length; j++)
                                    {
                                        list2.Add(int.Parse(array2[j]));
                                    }
                                    list.Add(list2);
                                }
                                this.comics.set_Item(num, list);
                                this.PlaySpineCallback(num);
                            }
                        }
                        this.out_system_lock = true;
                    }
                }
            }
        }
    }
Exemplo n.º 3
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);
     }
 }
Exemplo n.º 4
0
 private void SetCameraCullingMask(RTManager.RtType type, bool typeOn, int mask = 2)
 {
     if (typeOn)
     {
         CamerasMgr.EnableRTC(true);
         this.CullingMasks.set_Item(type, mask);
         RTManager.CurrentRtType = type;
     }
     else
     {
         this.CullingMasks.Remove(type);
         if (this.CullingMasks.get_Count() == 0)
         {
             CamerasMgr.EnableRTC(false);
             RTManager.CurrentRtType = RTManager.RtType.None;
         }
         else
         {
             RTManager.CurrentRtType = RTManager.RtType.LocalHeatDistortion;
         }
     }
     this.SetSLightRotation();
     if (RTManager.CurrentRtType == RTManager.RtType.None)
     {
         CamerasMgr.SetRTCCullingMask(0);
     }
     else
     {
         CamerasMgr.SetRTCCullingMask(this.CullingMasks.get_Item(RTManager.CurrentRtType));
         if (CamerasMgr.Camera2RTCommon != null)
         {
             CamerasMgr.Camera2RTCommon.set_backgroundColor(new Color(0f, 0f, 0f, 0f));
         }
     }
 }
Exemplo n.º 5
0
 private void DoPlay(JuQingShiJian plotInfo)
 {
     if (plotInfo.anime == -1)
     {
         CamerasMgr.OpenEye();
     }
     else
     {
         GuideManager.Instance.guide_lock = true;
         FXManager.Instance.PlayFXOfUI(plotInfo.anime, UINodesManager.MiddleUIRoot, 0, 3001, delegate
         {
             GuideManager.Instance.guide_lock = false;
         });
     }
 }
Exemplo n.º 6
0
 public void FixedCamera2RTCommon()
 {
     if (CamerasMgr.IsCamera2RTCommonTargetNull())
     {
         Debug.LogError("CamerasMgr.Camera2RTCommon.targetTexture == null");
         if (this.m_RTCommon != null)
         {
             CamerasMgr.Camera2RTCommon.set_targetTexture(this.m_RTCommon);
         }
         if (this.CurrentRawImageOfProjection != null)
         {
             RTManager.SetRT(this.CurrentRawImageOfProjection, this.RTCommon);
         }
     }
 }
Exemplo n.º 7
0
 public static void EnableRTC(bool bEnable)
 {
     if (CamerasMgr.Camera2RTCommon != null)
     {
         CamerasMgr.Camera2RTCommon.set_enabled(bEnable);
         if (bEnable)
         {
             CamerasMgr.ResetRTC();
         }
         else
         {
             RTManager.Instance.RTCommon.Release();
         }
     }
 }
Exemplo n.º 8
0
    public void SetMainCameraEnable()
    {
        bool flag = true;

        for (int i = 0; i < this.listBaseUI.get_Count(); i++)
        {
            if (this.listBaseUI.get_Item(i) != null && this.listBaseUI.get_Item(i).isVisible&& this.listBaseUI.get_Item(i).get_gameObject().get_activeInHierarchy() && this.listBaseUI.get_Item(i).hideMainCamera)
            {
                flag = false;
                break;
            }
        }
        CamerasMgr.EnableCamera2Main(flag);
        SoundManager.TurnOnOff2Player(flag);
        UINodesManager.SetNoEventsUIRootByMainCamera(flag);
    }
Exemplo n.º 9
0
 private void EnableRoleConversion(bool isOn)
 {
     if (!this.IsRoleConversionOn())
     {
         return;
     }
     if (PostProcessManager.IsRoleConversionUseTwoCameraOn)
     {
         CamerasMgr.SetCameraToStoryboard(isOn);
         this.EnableHolywood(isOn);
         this.EnableVignette(isOn);
     }
     else
     {
         this.EnableHolywoodOfRT(isOn);
         this.EnableVignetteOfRT(isOn);
     }
 }
Exemplo n.º 10
0
 public static void SetCameraToStoryboard(bool bStoryboard)
 {
     EventDispatcher.Broadcast <bool>(ShaderEffectEvent.CAMERA_IN_STORY, bStoryboard);
     if (bStoryboard)
     {
         UINodesManager.SetUICanvas3D(CamerasMgr.Camera2Storyboard);
         CamerasMgr.SetCameraStoryboard(CamerasMgr.Camera2Storyboard);
         CamerasMgr.Camera2Storyboard.set_enabled(true);
         Utils.SetCameraCullingMask(CamerasMgr._Camera2Storyboard, 4);
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 3);
     }
     else
     {
         UINodesManager.SetUICanvas3D(CamerasMgr.CameraMain);
         if (CamerasMgr._Camera2Storyboard != null)
         {
             CamerasMgr._Camera2Storyboard.set_enabled(false);
         }
         Utils.SetCameraCullingMask(CamerasMgr.CameraMain, 1);
     }
 }
Exemplo n.º 11
0
    private void SetCameraRenderType(RTManager.RtType type, bool typeOn)
    {
        this.ResetRotation();
        switch (type)
        {
        case RTManager.RtType.LocalHeatDistortion:
        {
            string[] array = new string[]
            {
                "FX_Distortion"
            };
            int mask = LayerMask.GetMask(array);
            this.SetCameraCullingMask(type, typeOn, mask);
            break;
        }

        case RTManager.RtType.Player:
        {
            if (EntityWorld.Instance.ActSelf != null)
            {
                ShadowController.ShowShadow(EntityWorld.Instance.EntSelf.ID, EntityWorld.Instance.ActSelf, typeOn, 0);
            }
            string[] layerNames = new string[]
            {
                "CameraRange"
            };
            int mask2 = LayerSystem.GetMask(layerNames);
            this.SetCameraCullingMask(type, typeOn, mask2);
            if (typeOn)
            {
                this.AimTargetOffsetY = ModelDisplayManager.GetPlayerAM().camProjPosRevise;
                if (ModelDisplayManager.GetPlayerAM().camProjRotRevise.get_Count() >= 2)
                {
                    RTManager.Instance.CamProjRotateRevise = new Vector3(0f, ModelDisplayManager.GetPlayerAM().camProjRotRevise.get_Item(0), ModelDisplayManager.GetPlayerAM().camProjRotRevise.get_Item(1));
                }
            }
            break;
        }

        case RTManager.RtType.ActorModel1:
            this.SetCameraCullingMask(type, typeOn, ModelDisplayManager.ModelFXMask);
            if (!typeOn)
            {
                this.HideModel();
                CamerasMgr.SetRTCClippingPlanes(0f);
            }
            else
            {
                CamerasMgr.SetRTCClippingPlanes(100000f);
            }
            break;

        case RTManager.RtType.InstanceBall:
        {
            string[] layerNames2 = new string[]
            {
                "BallItem",
                "BallObject"
            };
            int mask3 = LayerSystem.GetMask(layerNames2);
            this.SetCameraCullingMask(type, typeOn, mask3);
            if (!typeOn)
            {
                this.HideModel();
            }
            break;
        }

        case RTManager.RtType.ElementBall:
        {
            string[] layerNames3 = new string[]
            {
                "BallItem",
                "BallObject"
            };
            int mask4 = LayerSystem.GetMask(layerNames3);
            this.SetCameraCullingMask(type, typeOn, mask4);
            if (!typeOn)
            {
                this.HideModel();
            }
            break;
        }
        }
    }
Exemplo n.º 12
0
    private void Awake()
    {
        if (!Application.get_isEditor() && File.Exists(AppConst.IsDebugFilePath))
        {
            GameManager.IsDebug = true;
        }
        if (Debug.get_isDebugBuild())
        {
            ProfilerWrap.InitPool();
        }
        Singleton <EditorConfig> .S.Init();

        Debug.Log("GameManager Awake");
        GameManager.Instance = this;
        Application.set_runInBackground(true);
        if (AppConst.UseAssetBundle)
        {
            Action <string> loadFailed = null;
            if (!Singleton <SwitchFile> .S.IsFileExist(SwitchFile.FileName.ABCheck))
            {
                RuntimePlatform platform = Application.get_platform();
                switch (platform)
                {
                case 7:
                    loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
                    goto IL_152;

                case 8:
                case 11:
                    goto IL_152;

                case 9:
                case 10:
IL_A0:
                    if (platform != 2)
                    {
                        goto IL_152;
                    }
                    loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
                    if (this.ExtendFiles == null)
                    {
                        this.ExtendFiles = new HashSet <string>();
                        string text = PathUtil.Combine(new string[]
                        {
                            Application.get_streamingAssetsPath(),
                            PathSystem.SubPackageInfoFile.ExtendList
                        });
                        Debug.LogFormat("extendList :{0}", new object[]
                        {
                            text
                        });
                        string[] array  = File.ReadAllLines(text);
                        string[] array2 = array;
                        for (int i = 0; i < array2.Length; i++)
                        {
                            string text2 = array2[i];
                            this.ExtendFiles.Add(text2);
                        }
                    }
                    goto IL_152;
                }
                goto IL_A0;
            }
            loadFailed = new Action <string>(this.OnAssetBundleLoadFailed);
IL_152:
            AssetBundleLoader.Instance.Initialize(loadFailed);
        }
        CamerasMgr.InitMainCamera();
        UINodesManager.InitUICanvas();
        this.Init();
    }