Exemplo n.º 1
0
        public void AddTileData(TileData tile)
        {
            GOESceneRandomTile ranComp = this.GetComponent <GOESceneRandomTile>();

            ranComp.AddTile(tile);
        }
Exemplo n.º 2
0
        internal override void OnEnter()
        {
            this.terrain = this.GetTerrainGroup();
            if (terrain == null)
            {
                Logger.GetFile(LogFile.Global).LogWarning("can not find terrain");
                return;
            }

            base.OnEnter();
            AudioListener listener = terrain.GetComponentInChildren <AudioListener>();

            if (GOERoot.GOEQualityMgr.CurQualityType() == QualityType.Height)
            {
                GOERoot.GOEQualityMgr.HeightQuality();
            }
            if (GOERoot.GOEQualityMgr.CurQualityType() == QualityType.Mid)
            {
                GOERoot.GOEQualityMgr.MidQuality();
            }
            if (GOERoot.GOEQualityMgr.CurQualityType() == QualityType.Low)
            {
                GOERoot.GOEQualityMgr.LowQuality();
            }


            if (listener != null)
            {
                listener.enabled = false;
            }

            bool isRandomTile          = false;
            GOESceneRandomTile rancomp = this.GetComponent <GOESceneRandomTile>();

            if (rancomp != null)
            {
                isRandomTile = rancomp.GetTileCount() > 0;
            }
            bool   isBigTerrainX = false;
            string levelName     = Application.loadedLevelName;

            if (levelName.Contains("_pack"))
            {
                isBigTerrainX = true;
            }

            if (OnEnterScene != null)
            {
                OnEnterScene();
            }

            if (isRandomTile || isBigTerrainX)
            {
                Debug.Log("enter level but delay enter scene");
            }
            else
            {
                if (OnDynamicLoadedOk != null)
                {
                    OnDynamicLoadedOk();
                }
            }
        }
Exemplo n.º 3
0
        public void ClearTileData()
        {
            GOESceneRandomTile ranComp = this.GetComponent <GOESceneRandomTile>();

            ranComp.Clear();
        }