Example #1
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;
        }
        }
    }