Example #1
0
 void HandleClientPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "Position":
             var sorter = new ChunkRenderer.ChunkSorter(new Coordinates3D(
                 (int)Game.Client.Position.X, 0, (int)Game.Client.Position.Z));
             Game.Invoke(() => ChunkMeshes.Sort(sorter));
             break;
     }
 }
Example #2
0
 void HandleClientPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "Position":
             UpdateCamera();
             var sorter = new ChunkRenderer.ChunkSorter(new Coordinates3D(
                 (int)Client.Position.X, 0, (int)Client.Position.Z));
             PendingMainThreadActions.Add(() => ChunkMeshes.Sort(sorter));
             break;
     }
 }