added color variance
This commit is contained in:
@@ -6,6 +6,9 @@ public class Dirt : Solid {
|
||||
|
||||
public Dirt(int x, int y, ref Level level) : base(x, y, ref level) {
|
||||
Color = Colors.Brown;
|
||||
Color.R += (GD.Randf() - 1) * MaxColorVariance;
|
||||
Color.G += (GD.Randf() - 1) * MaxColorVariance;
|
||||
Color.B += (GD.Randf() - 1) * MaxColorVariance;
|
||||
}
|
||||
|
||||
public override bool Update(int currentFrame) {
|
||||
@@ -14,7 +17,7 @@ public class Dirt : Solid {
|
||||
Vector2I freePos = Check(this, Vector2I.Down + Vector2I.Right);
|
||||
|
||||
if (freePos != Vector2I.Zero) { // diagonally right
|
||||
_level.Swap(this, freePos);
|
||||
Level.Swap(this, freePos);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user