Add support for only rendering effects inside screen bounds
This commit is contained in:
committed by
Paul Chote
parent
8ca43e3d6b
commit
1aebf9857c
@@ -51,10 +51,15 @@ namespace OpenRA.Primitives
|
||||
MutateBins(item, itemBounds[item] = bounds, addItem);
|
||||
}
|
||||
|
||||
public void Remove(T item)
|
||||
public bool Remove(T item)
|
||||
{
|
||||
MutateBins(item, itemBounds[item], removeItem);
|
||||
Rectangle bounds;
|
||||
if (!itemBounds.TryGetValue(item, out bounds))
|
||||
return false;
|
||||
|
||||
MutateBins(item, bounds, removeItem);
|
||||
itemBounds.Remove(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
Dictionary<T, Rectangle> BinAt(int row, int col)
|
||||
|
||||
Reference in New Issue
Block a user