moved tick to process from physics process
fixed fall speed improved naming
This commit is contained in:
@@ -30,7 +30,7 @@ public class Level {
|
||||
|
||||
GD.Print($"Generating level ({sizeX}:{sizeY}) with {chunksPerX*chunksPerY} chunks ({chunkResX} * {chunkResY})");
|
||||
|
||||
image = Image.Create(sizeX, sizeY, false, Image.Format.Rgb8);
|
||||
image = Image.CreateEmpty(sizeX, sizeY, false, Image.Format.Rgb8);
|
||||
|
||||
chunks = new Chunk[chunksPerX, chunksPerY];
|
||||
int index = 0;
|
||||
@@ -165,7 +165,7 @@ public class Level {
|
||||
for (int y = 0; y < chunkResY; y++) {
|
||||
// TODO: multithreading here! use Chunk.DrawLevel() and stitch images together
|
||||
|
||||
if (chunks[cx, cy].Elements[x, y].MarkedForUpdate()) {
|
||||
if (chunks[cx, cy].Elements[x, y].IsMarkedForUpdate()) {
|
||||
image.SetPixel(cx * chunkResX + x, cy * chunkResY + y, chunks[cx, cy].Elements[x, y].Color);
|
||||
chunks[cx, cy].Elements[x, y].MarkForUpdate(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user