예제 #1
0
        private DistCullingCat GetCullingCatForGo(StreamingObject data)
        {
            var cat = Constants.GetDistCullingCatForStreamingGo(data.Size);

            var catFromTag = Constants.GetDistCullingCatForTag(data.SceneTag);

            if ((int)catFromTag < (int)cat)
            {
                cat = catFromTag;
            }

            return(cat);
        }
예제 #2
0
        private StreamingGo GetStreamingGo(StreamingObject data, int sceneIndex, int goIndex)
        {
            var go = _streamingGoPool.Get();

            go.Key.GoIndex    = goIndex;
            go.Key.SceneIndex = sceneIndex;

            go.Status = StreamingGoStatus.NotLoaded;
            go.Cat    = GetCullingCatForGo(data);

            go.AssetName = data.AssetName;
            go.Position  = data.Position;
            go.Size      = data.Size;


            return(go);
        }
예제 #3
0
        private bool FilterStreamingObject(StreamingObject so)
        {
            if (SharedConfig.IgnoreProp)
            {
                var tagValue = so.SceneTag;
                //filter inprop, out prop and inoutprop but wall, house and door, terrain

                if (MultiTagHelper.IsDoor(tagValue) || MultiTagHelper.IsHouse(tagValue) ||
                    MultiTagHelper.IsWall(tagValue) || MultiTagHelper.IsTerrain(tagValue))
                {
                    return(false);
                }

                if (MultiTagHelper.InDoor(tagValue) || MultiTagHelper.OutDoor(tagValue))
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #4
0
        void checkObjectVisible(GameObject obj, StreamingObject data)
        {
            string qualityName = GameSettingUtility.GetQualityName();
            var    allMaps     = SingletonManager.Get <MapsDescription>();

            if (allMaps.CurrentLevelType != LevelType.BigMap)
            {
                return;
            }
            MultiTagBase mul = obj.GetComponentInChildren <MultiTagBase>();

            if (mul == null)
            {
                return;
            }

            if (mul.btags[(int)MultiTagBase.TagEnum.House])
            {
                return;
            }

            mul.importantLevel = data.importantLevel;
            SceneConfig config = allMaps.BigMapParameters;

            if (config.PreMapName != "004")
            {
                return;
            }


            int level = 0;

            //TEST Code

            /*
             * int level = 0;
             * if(qualitDic.Count <= 0)
             * {
             *  qualitDic.Add("QL_Low", 0);
             *  qualitDic.Add("QL_MediumLow", 1);
             *  qualitDic.Add("QL_Medium", 2);
             *  qualitDic.Add("QL_MediumHigh", 3);
             *  qualitDic.Add("QL_High", 4);
             * }
             *
             * if(!qualitDic.ContainsKey(qualityName))
             * {
             *  return;
             * }
             *
             * level = qualitDic[qualityName];
             */
            if (mul.importantLevel <= level)
            {
                obj.SetActive(true);
            }
            else
            {
                obj.SetActive(false);
            }
        }