Пример #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]);
 }