mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
readonly
This commit is contained in:
parent
dac82ed1e2
commit
34e6e8fbd3
@ -16,10 +16,11 @@ public class Grid2D<T>
|
||||
// => makes the code a lot easier too
|
||||
// => this is FINE because in the worst case, every grid position in the
|
||||
// game world is filled with a player anyway!
|
||||
Dictionary<Vector2Int, HashSet<T>> grid = new Dictionary<Vector2Int, HashSet<T>>();
|
||||
readonly Dictionary<Vector2Int, HashSet<T>> grid =
|
||||
new Dictionary<Vector2Int, HashSet<T>>();
|
||||
|
||||
// cache a 9 neighbor grid of vector2 offsets so we can use them more easily
|
||||
Vector2Int[] neighbourOffsets =
|
||||
readonly Vector2Int[] neighbourOffsets =
|
||||
{
|
||||
Vector2Int.up,
|
||||
Vector2Int.up + Vector2Int.left,
|
||||
|
Loading…
Reference in New Issue
Block a user