示例#1
0
 public GridCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
 }
示例#2
0
 public GridCoordinates(float X, float Y, GridId argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
 }
示例#3
0
 public GridCoordinates(Vector2 argPosition, GridId argGrid)
 {
     Position = argPosition;
     GridID   = argGrid;
 }
示例#4
0
 /// <summary>
 ///     Construct new grid local coordinates relative to the default grid of a map.
 /// </summary>
 public GridCoordinates(Vector2 argPosition, IMap argMap)
 {
     Position = argPosition;
     GridID   = argMap.DefaultGrid.Index;
 }
示例#5
0
 public LocalCoordinates(float X, float Y, GridId argGrid, MapId argMap)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
     MapID    = argMap;
 }
示例#6
0
 public GridCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
 }
示例#7
0
 public LocalCoordinates(Vector2 argPosition, GridId argGrid, MapId argMap)
 {
     Position = argPosition;
     GridID   = argGrid;
     MapID    = argMap;
 }
示例#8
0
 public LocalCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
示例#9
0
 public LocalCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
示例#10
0
 public void RaiseOnGridRemoved(MapId mapId, GridId gridId)
 {
     OnGridRemoved?.Invoke(mapId, gridId);
 }
示例#11
0
 /// <summary>
 ///     Gets the grid associated with the given grid ID. If the grid with the given ID does not exist, return null.
 /// </summary>
 /// <param name="gridId">The id of the grid to get.</param>
 /// <returns></returns>
 public IMapGrid GetGrid(GridId gridId)
 {
     _grids.TryGetValue(gridId, out var output);
     return(output);
 }
示例#12
0
 /// <summary>
 ///     Checks if a grid exists with the given ID.
 /// </summary>
 /// <param name="gridId">The ID of the grid to check.</param>
 /// <returns></returns>
 public bool GridExists(GridId gridId)
 {
     return(_grids.ContainsKey(gridId));
 }
示例#13
0
 public IMapGrid GetGrid(GridId gridID)
 {
     return(_grids[gridID]);
 }