Example #1
0
 protected void RefreshTerrainSettings(ChunkMode mode)
 {
     if (!Chunk.HasPrimaryTerrain)
     {
         return;
     }
 }
Example #2
0
        public void Start()
        {
            LoadChunkTransforms(false);
            mCurrentMode = ChunkMode.Unloaded;
            mTargetMode  = ChunkMode.Unloaded;
            mInitialized = false;
            mChunkName   = ChunkName(State);

            Initialize();
        }
 /// <summary>
 /// Changes Tile in the Chunk
 /// This does not update the screen
 /// Please call the screen Update Function and pass this chunk,
 /// or update the whole display
 /// </summary>
 /// <param name="position">Position of the tile that should be changed</param>
 /// <param name="mode">The mode which should be used to determine the chunk</param>
 /// <param name="tileID">The tile ID what the tile will become</param>
 public void ChangeTile(Vector2Int position, ChunkMode mode, int tileID)
 {
     if (mode == ChunkMode.localChunkPosition)
     {
         //tileArray[position.x, position.y]
     }
     else if (mode == ChunkMode.tileWorldPosition)
     {
         //tileArray[position.x - positionClampers.x, position.y - positionClampers.y]
     }
 }
Example #4
0
 public void Awake()
 {
     Chunk = gameObject.GetComponent <WorldChunk> ();
     if (Chunk.TargetMode == Chunk.CurrentMode)              //wrap it up, we're done here!
     {
         Finish();
     }
     else if ((Chunk.TargetMode == ChunkMode.Primary && Chunk.CurrentMode == ChunkMode.Immediate) ||
              (Chunk.TargetMode == ChunkMode.Immediate && Chunk.CurrentMode == ChunkMode.Primary))                   //immediate and primary are identical
     //primary just means the player is >rightontopofit<
     //so wrap this up too
     {
         Finish();
     }
     StartTargetMode = Chunk.TargetMode;
     //if the target mode does not equal the current mode
     //start the update chunk process in Start
     //do not start enumerators in Awake
 }
Example #5
0
 public IEnumerator AddRivers(ChunkMode targetMode)
 {
     for (int i = 0; i < Rivers.Count; i++)
     {
         River river = Rivers [i];
         if (river.river == null)
         {
             CreateRiver(river);
         }
         if (Player.Local.HasSpawned && !Player.Local.Surroundings.IsOutside)
         {
             //give it a sec
             double waitUntil = WorldClock.RealTime + 0.125f + UnityEngine.Random.value;
             while (WorldClock.RealTime < waitUntil)
             {
                 yield return(null);
             }
         }
     }
     yield break;
 }
Example #6
0
 public void GetChunkingParameters(ref ChunkMode chunkMode, ref Int32[] chunkSizes) {
     Int32 chunkModeInt = 0;
     chunkSizes = new Int32[GetDimCount()];
     NcCheck.Check(NetCDF.nc_inq_var_chunking(groupId, myId, ref chunkModeInt, chunkSizes));
     chunkMode = (ChunkMode) chunkModeInt;
 }
Example #7
0
 public void SetChunking(ChunkMode chunkMode, Int32[] chunkSizes) {
     CheckNull();
     CheckDefine();
     NcCheck.Check(NetCDF.nc_def_var_chunking(groupId, myId, (Int32) chunkMode, chunkSizes));
 }
Example #8
0
 public bool Is(ChunkMode chunkMode)
 {
     return(Flags.Check((int)chunkMode, (int)mCurrentMode, Flags.CheckType.MatchAny));
 }
Example #9
0
        public Stream GetChunk(string chunkName, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes chunkType, ChunkMode chunkMode, out string mimeType)
        {
            Stream stream = ((SnapshotBase)this).GetChunk(chunkName, chunkType, out mimeType);

            if (chunkMode == ChunkMode.OpenOrCreate && stream == null)
            {
                mimeType = null;
                stream   = this.CreateChunk(chunkName, chunkType, mimeType);
            }
            return(stream);
        }
Example #10
0
        public Stream GetChunk(string chunkName, Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes chunkType, ChunkMode chunkMode, out string mimeType)
        {
            Stream stream = GetChunk(chunkName, chunkType, out mimeType);

            if (chunkMode == ChunkMode.OpenOrCreate && stream == null)
            {
                mimeType = null;
                stream   = CreateChunk(chunkName, chunkType, mimeType);
            }
            return(stream);
        }