hierarchy rework

fixed swap
This commit is contained in:
2023-11-05 20:09:18 +01:00
parent 7670b2982a
commit 8278312aee
9 changed files with 75 additions and 120 deletions

View File

@@ -12,14 +12,8 @@ public class Dirt : Solid {
public override bool Update(int currentFrame) {
if (!base.Update(currentFrame)) return false;
Vector2I freePos = Check(this, Vector2I.Down + Vector2I.Right);
if (freePos != Vector2I.Zero) { // diagonally right
Level.Swap(this, freePos);
return true;
}
Tick();
return true; // not necessarily end, subclasses could do some more things
}
}