Skip to content
Snippets Groups Projects
Commit c66b5b95 authored by Chang, Ryan's avatar Chang, Ryan
Browse files

Removed job cancellation

parent 81346812
No related branches found
No related tags found
No related merge requests found
......@@ -511,7 +511,7 @@ MonoBehaviour:
- amplitude: 0.02
frequency: 0.1
type: 1
mode: 0
mode: 1
neighboringCount: 1
initialCrawlPosition: {x: 0, y: 0}
terrainHeight: 1800
......
......@@ -71,10 +71,10 @@ public abstract class TerrainChunker : MonoBehaviour
{
print($"Updating {gameObject.name} terrain.");
if (!CheckIfFinished())
{
CancelRunning();
}
//if (!CheckIfFinished())
//{
// CancelRunning();
//}
CreateRunning();
lookForCompletion = true;
......@@ -87,7 +87,7 @@ public abstract class TerrainChunker : MonoBehaviour
/// <summary>
/// Checks and deals with any running.
/// </summary>
protected abstract void CancelRunning();
//protected abstract void CancelRunning();
protected abstract void CreateRunning();
......
......@@ -17,12 +17,12 @@ public class TerrainChunkerJobs : TerrainChunker
return shapeGenerator.Cancelled;
}
protected override void CancelRunning()
{
// Cancel thread if its running.
shapeGenerator.Cancel(runningShape);
print($"{gameObject.name} has running job, which has been cancelled.");
}
//protected override void CancelRunning()
//{
// //// Cancel thread if its running.
// //shapeGenerator.Cancel(runningShape);
// //print($"{gameObject.name} has running job, which has been cancelled.");
//}
protected override void CreateRunning()
{
......
......@@ -17,10 +17,10 @@ public class TerrainChunkerThreads : TerrainChunker
return shapeGenerator.Cancelled;
}
protected override void CancelRunning()
{
cts.Cancel();
}
//protected override void CancelRunning()
//{
// cts.Cancel();
//}
protected override void CreateRunning()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment