fixed inactive elements when spawning with brush

This commit is contained in:
2024-08-25 19:03:40 +02:00
parent 2d38774341
commit 7388e1a2d7
5 changed files with 16 additions and 17 deletions

View File

@@ -5,9 +5,9 @@ namespace FOU.Scripts.Elements;
public abstract class Solid : Element {
protected Solid(int x, int y, ref Chunk chunk) : base(x, y, chunk) { }
public override bool Update(int currentFrame) {
if (!base.Update(currentFrame)) return false;
if (LastMove + STEPS_UNTIL_INACTIVE < currentFrame) Active = false;
public override bool Update() {
if (!base.Update()) return false;
if (LastMove + STEPS_UNTIL_INACTIVE < Engine.GetFramesDrawn()) Active = false;
Tick();