finalized dirt
added base for liquids
This commit is contained in:
@@ -11,10 +11,14 @@ public class Dirt : Solid {
|
||||
public override bool Update(int currentFrame) {
|
||||
if (!base.Update(currentFrame)) return false;
|
||||
|
||||
if (CheckBelow(X, Y)) {
|
||||
_level.Swap(this, X, Y+1);
|
||||
Vector2I freePos = Check(this, Vector2I.Down + Vector2I.Right);
|
||||
|
||||
if (freePos != Vector2I.Zero) { // diagonally right
|
||||
_level.Swap(this, freePos);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
return true; // not necessarily end, subclasses could do some more things
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user