added falling sand - dirt actually
This commit is contained in:
@@ -3,7 +3,18 @@
|
||||
namespace FOU.Scripts.Elements;
|
||||
|
||||
public class Dirt : Solid {
|
||||
public Dirt() {
|
||||
|
||||
public Dirt(int x, int y, ref Level level) : base(x, y, ref level) {
|
||||
Color = Colors.Brown;
|
||||
}
|
||||
|
||||
public override bool Update(int currentFrame) {
|
||||
if (!base.Update(currentFrame)) return false;
|
||||
|
||||
if (CheckBelow(X, Y)) {
|
||||
_level.Swap(this, X, Y+1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user