added second element type: snow
added simple snow weather
This commit is contained in:
@@ -12,7 +12,7 @@ public class Element {
|
||||
|
||||
private int lastUpdate = -1;
|
||||
|
||||
public Element(int x, int y, ref Level level) {
|
||||
public Element(int x, int y, Level level) {
|
||||
Position.X = x;
|
||||
Position.Y = y;
|
||||
Level = level;
|
||||
@@ -52,4 +52,14 @@ public class Element {
|
||||
/// <returns>free position or V2.zero if nothing was found</returns>
|
||||
protected virtual Vector2I Check(Element source, Vector2I maxDirection) {
|
||||
return Vector2I.Zero;
|
||||
}}
|
||||
}
|
||||
|
||||
protected Color AddColorVariance(Color baseColor) {
|
||||
Color c = baseColor;
|
||||
c.R += (GD.Randf() - 1) * MaxColorVariance;
|
||||
c.G += (GD.Randf() - 1) * MaxColorVariance;
|
||||
c.B += (GD.Randf() - 1) * MaxColorVariance;
|
||||
return c;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user