示例#1
0
 public void Update()
 {
     HeavyTaskExecuted = false;
     RenewLease();
     if (Stage == ChunkStageEnum.Update)
     {
         UpdateLogic();
     }
     else if (Column.Stage == ChunkColumn.ColumnStageEnum.AllNeighborsGenerated)
     {
         if (HeavyTaskAllowed)
         {
             Column.Decorate();
             HeavyTaskExecuted = true;
         }
     }
     else if (Stage == ChunkStageEnum.NotGenerated)
     {
         if (HeavyTaskAllowed)
         {
             World.Instance.Generator(this).Generate(this);
             Stage = ChunkStageEnum.Generated;
             Column.OnChunkGenerated();
             HeavyTaskExecuted = true;
         }
     }
 }