hierarchy rework
fixed swap
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user