Exemplo n.º 1
0
 public GridCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
 }
Exemplo n.º 2
0
 public GridCoordinates(float X, float Y, GridId argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
 }
Exemplo n.º 3
0
 public GridCoordinates(Vector2 argPosition, GridId argGrid)
 {
     Position = argPosition;
     GridID   = argGrid;
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 public LocalCoordinates(float X, float Y, GridId argGrid, MapId argMap)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
     MapID    = argMap;
 }
Exemplo n.º 6
0
 public GridCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
 }
Exemplo n.º 7
0
 public LocalCoordinates(Vector2 argPosition, GridId argGrid, MapId argMap)
 {
     Position = argPosition;
     GridID   = argGrid;
     MapID    = argMap;
 }
Exemplo n.º 8
0
 public LocalCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
Exemplo n.º 9
0
 public LocalCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
Exemplo n.º 10
0
 public void RaiseOnGridRemoved(MapId mapId, GridId gridId)
 {
     OnGridRemoved?.Invoke(mapId, gridId);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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));
 }
Exemplo n.º 13
0
 public IMapGrid GetGrid(GridId gridID)
 {
     return(_grids[gridID]);
 }