added color variance
This commit is contained in:
@@ -7,14 +7,15 @@ public class Element {
|
||||
|
||||
public Vector2I Position;
|
||||
|
||||
protected Level _level;
|
||||
protected readonly float MaxColorVariance = 0.1f;
|
||||
protected readonly Level Level;
|
||||
|
||||
private int _lastUpdate = -1;
|
||||
private int lastUpdate = -1;
|
||||
|
||||
public Element(int x, int y, ref Level level) {
|
||||
Position.X = x;
|
||||
Position.Y = y;
|
||||
_level = level;
|
||||
Level = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -23,8 +24,8 @@ public class Element {
|
||||
/// <param name="currentFrame"></param>
|
||||
/// <returns>false if there is nothing to do</returns>
|
||||
public virtual bool Update(int currentFrame) {
|
||||
if (_lastUpdate == currentFrame) return false; // already updated this frame
|
||||
_lastUpdate = currentFrame;
|
||||
if (lastUpdate == currentFrame) return false; // already updated this frame
|
||||
lastUpdate = currentFrame;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user